├── firmware └── source │ ├── build │ └── keil │ │ ├── project_main │ │ ├── Flash │ │ │ ├── ExtDll.iex │ │ │ ├── startup_mkl25z4.d │ │ │ ├── app.o │ │ │ ├── db.o │ │ │ ├── ff.o │ │ │ ├── fmc.o │ │ │ ├── gps.o │ │ │ ├── mcg.o │ │ │ ├── rcm.o │ │ │ ├── smc.o │ │ │ ├── spi.o │ │ │ ├── app.crf │ │ │ ├── audio.o │ │ │ ├── db.crf │ │ │ ├── diskio.o │ │ │ ├── dtmf.crf │ │ │ ├── dtmf.o │ │ │ ├── ff.crf │ │ │ ├── fmc.crf │ │ │ ├── gps.crf │ │ │ ├── llwu.crf │ │ │ ├── llwu.o │ │ │ ├── m_time.o │ │ │ ├── mcg.crf │ │ │ ├── modem.o │ │ │ ├── rcm.crf │ │ │ ├── smc.crf │ │ │ ├── spi.crf │ │ │ ├── sst25.o │ │ │ ├── start.o │ │ │ ├── tick.crf │ │ │ ├── tick.o │ │ │ ├── uart.crf │ │ │ ├── uart.o │ │ │ ├── usbhw.o │ │ │ ├── GT1022.axf │ │ │ ├── GT1022.bin │ │ │ ├── GT1022.plg │ │ │ ├── audio.crf │ │ │ ├── diskio.crf │ │ │ ├── dtmf_app.o │ │ │ ├── gps_task.o │ │ │ ├── hal_i2c.o │ │ │ ├── hiduser.o │ │ │ ├── io_tasks.o │ │ │ ├── m_time.crf │ │ │ ├── modem.crf │ │ │ ├── ringbuf.o │ │ │ ├── sst25.crf │ │ │ ├── start.crf │ │ │ ├── sys_time.o │ │ │ ├── sysinit.o │ │ │ ├── tracker.o │ │ │ ├── usbcore.o │ │ │ ├── usbdesc.o │ │ │ ├── usbhw.crf │ │ │ ├── usbuser.o │ │ │ ├── xl362_io.o │ │ │ ├── dbg_cfg_app.o │ │ │ ├── dtmf_app.crf │ │ │ ├── flash_ftfa.o │ │ │ ├── flash_mem.crf │ │ │ ├── flash_mem.o │ │ │ ├── gps_task.crf │ │ │ ├── hal_i2c.crf │ │ │ ├── hiduser.crf │ │ │ ├── io_tasks.crf │ │ │ ├── ringbuf.crf │ │ │ ├── sos_tasks.crf │ │ │ ├── sos_tasks.o │ │ │ ├── sys_time.crf │ │ │ ├── sysinit.crf │ │ │ ├── tracker.crf │ │ │ ├── usbcore.crf │ │ │ ├── usbdesc.crf │ │ │ ├── usbuser.crf │ │ │ ├── xl362_io.crf │ │ │ ├── dbg_cfg_app.crf │ │ │ ├── flash_ftfa.crf │ │ │ ├── flash_ramfunc.o │ │ │ ├── gprs_cmd_ctrl.o │ │ │ ├── m_time.d │ │ │ ├── project_main.o │ │ │ ├── string_parser.o │ │ │ ├── system_config.o │ │ │ ├── ambo_pedometer.crf │ │ │ ├── ambo_pedometer.o │ │ │ ├── flash_ramfunc.crf │ │ │ ├── gprs_cmd_ctrl.crf │ │ │ ├── gsm_gprs_tasks.crf │ │ │ ├── gsm_gprs_tasks.o │ │ │ ├── nmi_isr_handler.o │ │ │ ├── pedometer_task.crf │ │ │ ├── pedometer_task.o │ │ │ ├── power_management.o │ │ │ ├── project_common.crf │ │ │ ├── project_common.o │ │ │ ├── project_main.crf │ │ │ ├── startup_mkl25z4.o │ │ │ ├── string_parser.crf │ │ │ ├── system_config.crf │ │ │ ├── system_mkl25z4.crf │ │ │ ├── system_mkl25z4.o │ │ │ ├── GT1022.build_log.htm │ │ │ ├── at_command_parser.o │ │ │ ├── nmi_isr_handler.crf │ │ │ ├── power_management.crf │ │ │ ├── upload_config_task.o │ │ │ ├── at_command_parser.crf │ │ │ ├── upload_config_task.crf │ │ │ ├── ambo_pedometer.d │ │ │ ├── ff.d │ │ │ ├── ringbuf.d │ │ │ ├── diskio.d │ │ │ ├── string_parser.d │ │ │ ├── usbdesc.d │ │ │ ├── system_mkl25z4.d │ │ │ ├── project_common.d │ │ │ ├── GT1022.sct │ │ │ ├── gps.d │ │ │ ├── usbhw.d │ │ │ ├── mcg.d │ │ │ ├── sys_time.d │ │ │ ├── smc.d │ │ │ ├── spi.d │ │ │ ├── fmc.d │ │ │ ├── hal_i2c.d │ │ │ ├── sysinit.d │ │ │ ├── llwu.d │ │ │ ├── flash_ramfunc.d │ │ │ ├── sst25.d │ │ │ ├── dtmf.d │ │ │ ├── nmi_isr_handler.d │ │ │ ├── flash_ftfa.d │ │ │ ├── xl362_io.d │ │ │ ├── dtmf_app.d │ │ │ ├── flash_mem.d │ │ │ ├── hiduser.d │ │ │ ├── usbuser.d │ │ │ ├── system_config.d │ │ │ ├── usbcore.d │ │ │ └── GT1022.lnp │ │ ├── Delete.bat │ │ ├── project_main.plg │ │ ├── project_main_Flash.plg │ │ ├── project_main.uvmpw │ │ ├── JLinkSettings.ini │ │ └── pemicro_connection_settings.ini │ │ ├── project_bootloader │ │ ├── Flash │ │ │ ├── ExtDll.iex │ │ │ ├── startup_mkl25z4.d │ │ │ ├── fmc.crf │ │ │ ├── fmc.o │ │ │ ├── spi.crf │ │ │ ├── spi.o │ │ │ ├── sst25.o │ │ │ ├── usbhw.o │ │ │ ├── cdcuser.o │ │ │ ├── hiduser.o │ │ │ ├── mscuser.o │ │ │ ├── ringbuf.o │ │ │ ├── sst25.crf │ │ │ ├── sysinit.o │ │ │ ├── usbcore.o │ │ │ ├── usbdesc.o │ │ │ ├── usbhw.crf │ │ │ ├── usbuser.o │ │ │ ├── cdcuser.crf │ │ │ ├── flash_ftfa.o │ │ │ ├── flashprog.o │ │ │ ├── hiduser.crf │ │ │ ├── mscuser.crf │ │ │ ├── ringbuf.crf │ │ │ ├── sysinit.crf │ │ │ ├── usbcore.crf │ │ │ ├── usbdesc.crf │ │ │ ├── usbuser.crf │ │ │ ├── flash_ftfa.crf │ │ │ ├── flashprog.crf │ │ │ ├── GT1022_BOOT.axf │ │ │ ├── GT1022_BOOT.bin │ │ │ ├── GT1022_BOOT.plg │ │ │ ├── flash_ramfunc.crf │ │ │ ├── flash_ramfunc.o │ │ │ ├── startup_mkl25z4.o │ │ │ ├── system_mkl25z4.o │ │ │ ├── system_mkl25z4.crf │ │ │ ├── project_bootloader.crf │ │ │ ├── project_bootloader.o │ │ │ ├── GT1022_BOOT.build_log.htm │ │ │ ├── ringbuf.d │ │ │ ├── system_mkl25z4.d │ │ │ ├── usbdesc.d │ │ │ ├── GT1022_BOOT.sct │ │ │ ├── GT1022_BOOT.lnp │ │ │ ├── usbhw.d │ │ │ ├── fmc.d │ │ │ ├── spi.d │ │ │ ├── sysinit.d │ │ │ ├── flash_ramfunc.d │ │ │ ├── sst25.d │ │ │ ├── flash_ftfa.d │ │ │ ├── flashprog.d │ │ │ ├── hiduser.d │ │ │ ├── cdcuser.d │ │ │ ├── usbuser.d │ │ │ ├── mscuser.d │ │ │ └── usbcore.d │ │ ├── Delete.bat │ │ ├── project_bootloader.plg │ │ ├── project_bootloader_Flash.plg │ │ ├── project_bootloader.uvmpw │ │ ├── JLinkSettings.ini │ │ └── pemicro_connection_settings.ini │ │ └── workspace.uvmpw │ ├── src │ ├── Libraries │ │ └── common_lib │ │ │ ├── acclerometer │ │ │ ├── xl362.c │ │ │ ├── hal_dev_mma8451.h │ │ │ ├── accelerometer.h │ │ │ └── hal_dev_mma8451.c │ │ │ ├── ringbuff.rar │ │ │ ├── gsm_modem │ │ │ └── modem.c │ │ │ ├── string_parser.rar │ │ │ ├── angle_calculation │ │ │ ├── angle_cal.c │ │ │ ├── asin.h │ │ │ ├── sqrt16.h │ │ │ ├── median.h │ │ │ ├── angle_cal.h │ │ │ ├── sqrt16.c │ │ │ ├── median.c │ │ │ └── asin.c │ │ │ ├── ppp │ │ │ ├── fcs.h │ │ │ ├── xtea.h │ │ │ ├── typedef.h │ │ │ ├── xtea.c │ │ │ └── ppp.h │ │ │ ├── sys_time │ │ │ ├── m_time.h │ │ │ └── sys_time.h │ │ │ ├── uip │ │ │ ├── uip_ppp.h │ │ │ ├── resolver.h │ │ │ ├── uip_ppp.c │ │ │ └── resolver.c │ │ │ ├── pedometer │ │ │ ├── ambo_pedometer.h │ │ │ └── pedometer_task.h │ │ │ ├── ringbuff │ │ │ └── ringbuf.h │ │ │ └── string_parser │ │ │ └── string_parser.h │ ├── projects │ │ ├── project_main │ │ │ ├── app.h │ │ │ ├── project_common.c │ │ │ ├── at_command_parser.c │ │ │ ├── DTMF_app.h │ │ │ ├── project_common.h │ │ │ ├── power_management.h │ │ │ ├── main.c │ │ │ ├── app.c │ │ │ ├── download_config_task.h │ │ │ ├── upload_config_task.h │ │ │ ├── audio.h │ │ │ ├── isr.h │ │ │ ├── sys_rtc.h │ │ │ ├── gps_task.h │ │ │ ├── tracker.h │ │ │ ├── gprs_cmd_ctrl.h │ │ │ ├── sos_tasks.h │ │ │ ├── DTMF.h │ │ │ └── usbdesc.h │ │ └── project_bootloader │ │ │ ├── flashprog.h │ │ │ ├── isr.h │ │ │ ├── sysinit.h │ │ │ └── mscuser.h │ ├── drivers │ │ ├── uart │ │ │ ├── Retarget.c │ │ │ ├── Serial.h │ │ │ └── uart.h │ │ ├── FTFA │ │ │ ├── flash_ramFunc.c │ │ │ └── flash_FTFA.h │ │ ├── flash │ │ │ └── fmc.h │ │ ├── spi │ │ │ ├── spi.h │ │ │ └── spi.c │ │ ├── cmp │ │ │ └── cmp.h │ │ ├── rcm │ │ │ └── rcm.h │ │ ├── rtc │ │ │ └── rtc.h │ │ ├── bsp │ │ │ ├── bsp_KL25.h │ │ │ └── bsp_KL25.c │ │ ├── lptmr │ │ │ └── lptmr.h │ │ ├── smc │ │ │ └── smc.h │ │ ├── i2c │ │ │ └── hal_i2c.h │ │ ├── pit │ │ │ └── pit.h │ │ ├── llwu │ │ │ └── llwu.h │ │ ├── pmc │ │ │ └── pmc.h │ │ ├── tick │ │ │ └── tick.h │ │ └── usb │ │ │ ├── usbhw.h │ │ │ ├── mscuser.h │ │ │ └── hiduser.h │ ├── cpu │ │ ├── nmi_isr_handler.h │ │ ├── start.h │ │ ├── sysinit.h │ │ ├── crt0.s │ │ ├── cw_crt0.s │ │ └── nmi_isr_handler.c │ ├── FATFS │ │ └── ff9b │ │ │ └── src │ │ │ ├── option │ │ │ └── unicode.c │ │ │ ├── flash_mem.h │ │ │ ├── integer.h │ │ │ └── flash_mem.c │ └── common │ │ ├── startup.h │ │ ├── io.h │ │ ├── assert.h │ │ ├── typedef.h │ │ ├── assert.c │ │ ├── queue.h │ │ ├── memtest.h │ │ └── io.c │ ├── audio │ └── 00 │ │ ├── 0.wav │ │ ├── 1.wav │ │ ├── 2.wav │ │ ├── 3.wav │ │ ├── 4.wav │ │ ├── 5.wav │ │ ├── 6.wav │ │ ├── 7.wav │ │ ├── 8.wav │ │ ├── 9.wav │ │ ├── 1_1.wav │ │ ├── 1_2.wav │ │ ├── 2_1.wav │ │ ├── 2_2.wav │ │ ├── 2_4.wav │ │ ├── 2_5.wav │ │ ├── 2_6.wav │ │ ├── 2_7.wav │ │ ├── 3_1.wav │ │ ├── 3_2.wav │ │ ├── 3_3.wav │ │ ├── 3_4.wav │ │ ├── 3_5.wav │ │ ├── 3_6.wav │ │ ├── 3_7.wav │ │ ├── 4_1.wav │ │ ├── 4_2.wav │ │ ├── 5_1.wav │ │ ├── 5_3.wav │ │ ├── 5_4.wav │ │ ├── 5_5.wav │ │ ├── 6_1.wav │ │ ├── 6_3.wav │ │ ├── 6_4.wav │ │ ├── 6_5.wav │ │ ├── 6_6.wav │ │ ├── 6_7.wav │ │ ├── 6_8.wav │ │ ├── 6_9.wav │ │ ├── ring.wav │ │ └── text.txt │ ├── exclude_list.txt │ └── copy.bat ├── hardware ├── PSU.SchDoc ├── Main.SchDoc ├── AMPM_GT1022.pdf ├── GSM_GPS.SchDoc └── GT1022_V3.PcbDoc ├── docs ├── ACCL │ ├── ADXL345.pdf │ ├── irf9540n.pdf │ ├── BST-BMA250-DS002-05.pdf │ └── ADP_ProductSummary_(WLS-EK-12000).pdf └── memory │ └── W25Q64CV.pdf ├── mass_production └── BOM.xls ├── soft └── boot_pc_app │ ├── setting.CFG │ ├── setting_6num.CFG │ ├── exclude_list_listener.txt │ └── copy_listener.bat ├── personal_tracker_spec ├── spec.pdf ├── Server Protocol.docx ├── Tracker Configuration through SMS_v2.0.pdf └── Tracker Configuration through Web page_v2.0.pdf └── README.md /firmware/source/build/keil/project_main/Flash/ExtDll.iex: -------------------------------------------------------------------------------- 1 | [EXTDLL] 2 | Count=0 3 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/ExtDll.iex: -------------------------------------------------------------------------------- 1 | [EXTDLL] 2 | Count=0 3 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/acclerometer/xl362.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "xl362.h" 4 | 5 | 6 | -------------------------------------------------------------------------------- /hardware/PSU.SchDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/hardware/PSU.SchDoc -------------------------------------------------------------------------------- /docs/ACCL/ADXL345.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/docs/ACCL/ADXL345.pdf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Delete.bat: -------------------------------------------------------------------------------- 1 | del *.o 2 | del *.d 3 | del *.crf 4 | del *.i 5 | del *.__i -------------------------------------------------------------------------------- /hardware/Main.SchDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/hardware/Main.SchDoc -------------------------------------------------------------------------------- /docs/ACCL/irf9540n.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/docs/ACCL/irf9540n.pdf -------------------------------------------------------------------------------- /docs/memory/W25Q64CV.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/docs/memory/W25Q64CV.pdf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Delete.bat: -------------------------------------------------------------------------------- 1 | del *.o 2 | del *.d 3 | del *.crf 4 | del *.i 5 | del *.__i -------------------------------------------------------------------------------- /hardware/AMPM_GT1022.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/hardware/AMPM_GT1022.pdf -------------------------------------------------------------------------------- /hardware/GSM_GPS.SchDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/hardware/GSM_GPS.SchDoc -------------------------------------------------------------------------------- /mass_production/BOM.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/mass_production/BOM.xls -------------------------------------------------------------------------------- /hardware/GT1022_V3.PcbDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/hardware/GT1022_V3.PcbDoc -------------------------------------------------------------------------------- /soft/boot_pc_app/setting.CFG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/soft/boot_pc_app/setting.CFG -------------------------------------------------------------------------------- /firmware/source/audio/00/0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/0.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/4.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/5.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/7.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/8.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/9.wav -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/startup_mkl25z4.d: -------------------------------------------------------------------------------- 1 | .\flash\startup_mkl25z4.o: ..\..\..\src\cpu\startup_MKL25Z4.s 2 | -------------------------------------------------------------------------------- /personal_tracker_spec/spec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/personal_tracker_spec/spec.pdf -------------------------------------------------------------------------------- /docs/ACCL/BST-BMA250-DS002-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/docs/ACCL/BST-BMA250-DS002-05.pdf -------------------------------------------------------------------------------- /firmware/source/audio/00/1_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/1_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/1_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/1_2.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_2.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_4.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_5.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_6.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/2_7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/2_7.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_2.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_3.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_4.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_5.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_6.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/3_7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/3_7.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/4_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/4_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/4_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/4_2.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/5_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/5_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/5_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/5_3.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/5_4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/5_4.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/5_5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/5_5.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_1.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_3.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_4.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_5.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_6.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_7.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_8.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/6_9.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/6_9.wav -------------------------------------------------------------------------------- /firmware/source/audio/00/ring.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/audio/00/ring.wav -------------------------------------------------------------------------------- /soft/boot_pc_app/setting_6num.CFG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/soft/boot_pc_app/setting_6num.CFG -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/app.h: -------------------------------------------------------------------------------- 1 | #ifndef __APP_H__ 2 | #define __APP_H__ 3 | 4 | 5 | void RunApplication(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/project_common.c: -------------------------------------------------------------------------------- 1 | #include "project_common.h" 2 | 3 | 4 | FATFS sdfs; 5 | 6 | uint8_t mainBuf[1280]; 7 | 8 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/uart/Retarget.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/drivers/uart/Retarget.c -------------------------------------------------------------------------------- /personal_tracker_spec/Server Protocol.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/personal_tracker_spec/Server Protocol.docx -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/startup_mkl25z4.d: -------------------------------------------------------------------------------- 1 | .\flash\startup_mkl25z4.o: ..\..\..\src\projects\project_bootloader\startup_MKL25Z4.s 2 | -------------------------------------------------------------------------------- /docs/ACCL/ADP_ProductSummary_(WLS-EK-12000).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/docs/ACCL/ADP_ProductSummary_(WLS-EK-12000).pdf -------------------------------------------------------------------------------- /firmware/source/exclude_list.txt: -------------------------------------------------------------------------------- 1 | .__i 2 | ._ia 3 | .crf 4 | .d 5 | .iex 6 | .axf 7 | .htm 8 | .lnp 9 | .sct 10 | .tra 11 | .bak 12 | .Bak 13 | .map 14 | .lst -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/app.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/app.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/db.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/db.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ff.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ff.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/fmc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/fmc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gps.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gps.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/mcg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/mcg.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/rcm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/rcm.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/smc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/smc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/spi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/spi.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/app.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/app.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/audio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/audio.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/db.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/db.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/diskio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/diskio.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dtmf.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dtmf.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ff.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ff.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/fmc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/fmc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gps.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gps.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/llwu.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/llwu.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/llwu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/llwu.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/m_time.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/m_time.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/mcg.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/mcg.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/modem.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/modem.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/rcm.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/rcm.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/smc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/smc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/spi.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/spi.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sst25.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sst25.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/start.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/start.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/tick.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/tick.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/tick.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/tick.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/uart.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/uart.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/uart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/uart.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbhw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbhw.o -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ringbuff.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/Libraries/common_lib/ringbuff.rar -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/GT1022.axf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/GT1022.bin -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/GT1022.plg -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/audio.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/audio.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/diskio.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/diskio.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf_app.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dtmf_app.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gps_task.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gps_task.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hal_i2c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/hal_i2c.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hiduser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/hiduser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/io_tasks.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/io_tasks.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/m_time.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/m_time.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/modem.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/modem.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ringbuf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ringbuf.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sst25.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sst25.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/start.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/start.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sys_time.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sys_time.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sysinit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sysinit.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/tracker.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/tracker.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbcore.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbcore.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbdesc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbdesc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbhw.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbhw.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbuser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbuser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/xl362_io.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/xl362_io.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/project_main.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/project_main.plg -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/fmc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/fmc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/fmc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/fmc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/spi.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/spi.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/spi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/spi.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sst25.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/sst25.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbhw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbhw.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dbg_cfg_app.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dbg_cfg_app.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf_app.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dtmf_app.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ftfa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_ftfa.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_mem.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_mem.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_mem.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_mem.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gps_task.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gps_task.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hal_i2c.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/hal_i2c.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hiduser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/hiduser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/io_tasks.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/io_tasks.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ringbuf.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ringbuf.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sos_tasks.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sos_tasks.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sos_tasks.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sos_tasks.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sys_time.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sys_time.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sysinit.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/sysinit.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/tracker.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/tracker.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbcore.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbcore.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbdesc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbdesc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbuser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/usbuser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/xl362_io.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/xl362_io.crf -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/gsm_modem/modem.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/Libraries/common_lib/gsm_modem/modem.c -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/string_parser.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/Libraries/common_lib/string_parser.rar -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/cdcuser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/cdcuser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/hiduser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/hiduser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/mscuser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/mscuser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/ringbuf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/ringbuf.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sst25.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/sst25.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sysinit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/sysinit.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbcore.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbcore.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbdesc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbdesc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbhw.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbhw.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbuser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbuser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dbg_cfg_app.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/dbg_cfg_app.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ftfa.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_ftfa.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ramfunc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_ramfunc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gprs_cmd_ctrl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gprs_cmd_ctrl.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/m_time.d: -------------------------------------------------------------------------------- 1 | .\flash\m_time.o: ..\..\..\src\Libraries\common_lib\sys_time\m_time.c 2 | .\flash\m_time.o: C:\Keil\ARM\ARMCC\bin\..\include\time.h 3 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/project_main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/project_main.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/string_parser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/string_parser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_config.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/system_config.o -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/at_command_parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/projects/project_main/at_command_parser.c -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/cdcuser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/cdcuser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ftfa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flash_ftfa.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flashprog.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flashprog.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/hiduser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/hiduser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/mscuser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/mscuser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/ringbuf.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/ringbuf.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sysinit.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/sysinit.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbcore.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbcore.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbdesc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbdesc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbuser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/usbuser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ambo_pedometer.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ambo_pedometer.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ambo_pedometer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/ambo_pedometer.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ramfunc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/flash_ramfunc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gprs_cmd_ctrl.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gprs_cmd_ctrl.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gsm_gprs_tasks.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gsm_gprs_tasks.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gsm_gprs_tasks.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/gsm_gprs_tasks.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/nmi_isr_handler.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/nmi_isr_handler.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/pedometer_task.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/pedometer_task.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/pedometer_task.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/pedometer_task.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/power_management.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/power_management.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/project_common.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/project_common.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/project_common.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/project_common.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/project_main.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/project_main.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/startup_mkl25z4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/startup_mkl25z4.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/string_parser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/string_parser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_config.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/system_config.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_mkl25z4.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/system_mkl25z4.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_mkl25z4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/system_mkl25z4.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/project_main_Flash.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/project_main_Flash.plg -------------------------------------------------------------------------------- /personal_tracker_spec/Tracker Configuration through SMS_v2.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/personal_tracker_spec/Tracker Configuration through SMS_v2.0.pdf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ftfa.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flash_ftfa.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flashprog.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flashprog.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.build_log.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/GT1022.build_log.htm -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/at_command_parser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/at_command_parser.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/nmi_isr_handler.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/nmi_isr_handler.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/power_management.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/power_management.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/upload_config_task.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/upload_config_task.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.axf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.axf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.bin -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.plg -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ramfunc.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flash_ramfunc.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ramfunc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/flash_ramfunc.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/startup_mkl25z4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/startup_mkl25z4.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/system_mkl25z4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/system_mkl25z4.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/project_bootloader.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/project_bootloader.plg -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/at_command_parser.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/at_command_parser.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/upload_config_task.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_main/Flash/upload_config_task.crf -------------------------------------------------------------------------------- /personal_tracker_spec/Tracker Configuration through Web page_v2.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/personal_tracker_spec/Tracker Configuration through Web page_v2.0.pdf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/system_mkl25z4.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/system_mkl25z4.crf -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/angle_cal.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/src/Libraries/common_lib/angle_calculation/angle_cal.c -------------------------------------------------------------------------------- /soft/boot_pc_app/exclude_list_listener.txt: -------------------------------------------------------------------------------- 1 | \bin\Debug\ 2 | \bin\Release\ 3 | \bin\x86 4 | \bin\x64\Release\ 5 | \bin\x64\Debug\log0 6 | \bin\x64\Debug\log1 7 | \bin\x64\Debug\log2 8 | \bin\x64\Debug\log3 9 | \obj\ -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/project_bootloader.crf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/project_bootloader.crf -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/project_bootloader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/project_bootloader.o -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/project_bootloader_Flash.plg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/project_bootloader_Flash.plg -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.build_log.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thienhaiblue/ampm_personal_tracker/HEAD/firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.build_log.htm -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ppp/fcs.h: -------------------------------------------------------------------------------- 1 | #ifndef _FCS_H_ 2 | #define _FCS_H_ 3 | 4 | #include "typedef.h" 5 | 6 | U16 FCS_Get(U8 *cp, U32 len); 7 | U16 FCS_Calculate(U8 val, U16 fcs); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ppp/xtea.h: -------------------------------------------------------------------------------- 1 | #ifndef _XTEA_H_ 2 | #define _XTEA_H_ 3 | 4 | void XTEA_Decrypt(U16 num_rounds, U32 v[2], U32 const k[4]); 5 | void XTEA_Encrypt(U16 num_rounds, U32 v[2], U32 const k[4]); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/sys_time/m_time.h: -------------------------------------------------------------------------------- 1 | #ifndef __M_TIME_H__ 2 | #define __M_TIME_H__ 3 | 4 | 5 | struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf); 6 | time_t mktime(struct tm *tmbuf); 7 | 8 | #endif 9 | 10 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/nmi_isr_handler.h: -------------------------------------------------------------------------------- 1 | /* File: nmi_isr_handler.h 2 | * Purpose: Provides routines for handling nmi isr. 3 | * 4 | * Notes: 5 | * 6 | */ 7 | void nmi_isr(void); 8 | void enable_NMI_button(void); 9 | 10 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/start.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: start.h 3 | * Purpose: Kinetis L Family start up routines. 4 | * 5 | * Notes: 6 | */ 7 | 8 | 9 | // Function prototypes 10 | void start(void); 11 | void cpu_identify(void); 12 | void flash_identify(void); 13 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/asin.h: -------------------------------------------------------------------------------- 1 | 2 | /* asin.h 3 | 4 | determine degree from 0 to 900 arc sin 5 | lookup table for arc sin function for 6 | 128 values return degrees from 0 to 900 7 | 8 | */ 9 | extern const int my_asin[]; 10 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/uip/uip_ppp.h: -------------------------------------------------------------------------------- 1 | #ifndef _UIP_PPP_H_ 2 | #define _UIP_PPP_H_ 3 | 4 | #include "ppp.h" 5 | #include "timer.h" 6 | #include "uip.h" 7 | 8 | void UIP_SetHostAddr(void); 9 | void UIP_Periodic(void); 10 | void UIP_Input(void); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/FTFA/flash_ramFunc.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | 4 | void SpSub(void) 5 | { 6 | /* Launch command */ 7 | FTFA_FSTAT |= FTFA_FSTAT_CCIF_MASK; 8 | /* wait for command completion */ 9 | while (!(FTFA_FSTAT & FTFA_FSTAT_CCIF_MASK)) {}; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ambo_pedometer.d: -------------------------------------------------------------------------------- 1 | .\flash\ambo_pedometer.o: ..\..\..\src\Libraries\common_lib\pedometer\ambo_pedometer.c 2 | .\flash\ambo_pedometer.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 3 | .\flash\ambo_pedometer.o: ..\..\..\src\Libraries\common_lib\pedometer\ambo_pedometer.h 4 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ff.d: -------------------------------------------------------------------------------- 1 | .\flash\ff.o: ..\..\..\src\FATFS\ff9b\src\ff.c 2 | .\flash\ff.o: ..\..\..\src\FATFS\ff9b\src\ff.h 3 | .\flash\ff.o: ..\..\..\src\FATFS\ff9b\src\integer.h 4 | .\flash\ff.o: ..\..\..\src\FATFS\ff9b\src\ffconf.h 5 | .\flash\ff.o: ..\..\..\src\FATFS\ff9b\src\diskio.h 6 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/DTMF_app.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #ifndef __DTMF_APP_H__ 5 | #define __DTMF_APP_H__ 6 | #include "ringbuf.h" 7 | 8 | extern RINGBUF DTMF_ringBuff; 9 | 10 | extern void DTMF_DeInit(void); 11 | extern char DTMF_Task(void); 12 | extern void DTMF_Init(void); 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/sqrt16.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \brief Calculates the square root of the value 3 | * \author Luis Puebla 4 | * \param value 5 | * \return (unsigend long)square root 6 | * \todo 7 | * \warning 8 | */ 9 | unsigned int sqrt_16(unsigned int value); 10 | 11 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/ringbuf.d: -------------------------------------------------------------------------------- 1 | .\flash\ringbuf.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.c 2 | .\flash\ringbuf.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 3 | .\flash\ringbuf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\ringbuf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 5 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/ringbuf.d: -------------------------------------------------------------------------------- 1 | .\flash\ringbuf.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.c 2 | .\flash\ringbuf.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 3 | .\flash\ringbuf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\ringbuf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 5 | -------------------------------------------------------------------------------- /soft/boot_pc_app/copy_listener.bat: -------------------------------------------------------------------------------- 1 | set workspace=D:\03_Workspace\01_AMBO\Personal_Tracking\GT1022TrackerListener 2 | set svn_workspace=GT1022TrackerListener 3 | rmdir %svn_workspace% /S /Q 4 | mkdir %svn_workspace% 5 | xcopy %workspace%\* %svn_workspace%\* /e /exclude:exclude_list_listener.txt 6 | set workspace= 7 | set svn_workspace= 8 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/acclerometer/hal_dev_mma8451.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | void hal_dev_mma8451_init(void); //prepare I2C port 4 | uint8 hal_dev_mma8451_read_reg(uint8 addr); 5 | void hal_dev_mma8451_write_reg(uint8 addr, uint8 data); 6 | uint16 hal_dev_mma8451_test_reg_rw(void); 7 | void hal_dev_mma8451_test_function(void); 8 | 9 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/diskio.d: -------------------------------------------------------------------------------- 1 | .\flash\diskio.o: ..\..\..\src\FATFS\ff9b\src\diskio.c 2 | .\flash\diskio.o: ..\..\..\src\FATFS\ff9b\src\diskio.h 3 | .\flash\diskio.o: ..\..\..\src\FATFS\ff9b\src\integer.h 4 | .\flash\diskio.o: ..\..\..\src\FATFS\ff9b\src\flash_mem.h 5 | .\flash\diskio.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 6 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/uip/resolver.h: -------------------------------------------------------------------------------- 1 | #ifndef _RESOLVER_H_ 2 | #define _RESOLVER_H_ 3 | 4 | #include "uip_ppp.h" 5 | #include "resolv.h" 6 | #include "typedef.h" 7 | 8 | void RESOLVER_Reset(void); 9 | void RESOLVER_Manage(void); 10 | uip_ipaddr_t *RESOLVER_Lookup(const I8 *name); 11 | void RESOLVER_Query(const I8 *name); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/project_common.h: -------------------------------------------------------------------------------- 1 | #ifndef __PROJECT_COMMON_H__ 2 | #define __PROJECT_COMMON_H__ 3 | #include 4 | #include 5 | #include "ff.h" 6 | #include "diskio.h" 7 | 8 | extern uint8_t mainBuf[1280]; 9 | extern uint8_t flagPwrOn; 10 | extern uint8_t flagPwrOff; 11 | 12 | extern FATFS sdfs; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/string_parser.d: -------------------------------------------------------------------------------- 1 | .\flash\string_parser.o: ..\..\..\src\Libraries\common_lib\string_parser\string_parser.c 2 | .\flash\string_parser.o: ..\..\..\src\drivers\tick\tick.h 3 | .\flash\string_parser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\string_parser.o: ..\..\..\src\Libraries\common_lib\string_parser\string_parser.h 5 | -------------------------------------------------------------------------------- /firmware/source/src/FATFS/ff9b/src/option/unicode.c: -------------------------------------------------------------------------------- 1 | #include "../ff.h" 2 | 3 | #if _USE_LFN != 0 4 | 5 | #if _CODE_PAGE == 932 6 | #include "cc932.c" 7 | #elif _CODE_PAGE == 936 8 | #include "cc936.c" 9 | #elif _CODE_PAGE == 949 10 | #include "cc949.c" 11 | #elif _CODE_PAGE == 950 12 | #include "cc950.c" 13 | #else 14 | #include "ccsbcs.c" 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_bootloader/flashprog.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLASH_PROG_H__ 2 | #define __FLASH_PROG_H__ 3 | //====================================================== 4 | #define PAGE_SIZE 1024 5 | 6 | 7 | void myFMC_Erase(uint32_t u32addr); 8 | void FMC_ProgramPage(uint32_t u32startAddr, uint32_t * u32buff); 9 | void myFMC_Write(uint32_t u32addr, uint32_t u32data); 10 | #endif 11 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/flash/fmc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #ifndef __FMC_H__ 5 | #define __FMC_H__ 6 | #include 7 | 8 | typedef enum 9 | { 10 | FLASH_BUSY = 0, 11 | FLASH_COMPLETE, 12 | FLASH_ERROR_PG, 13 | FLASH_ERROR_WRP, 14 | FLASH_TIMEOUT 15 | }FLASH_Status; 16 | 17 | FLASH_Status FLASH_ErasePage(uint32_t Page_Address); 18 | FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ppp/typedef.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * Standard Types definition 4 | * \author 5 | * Thanh M. Phan 6 | */ 7 | 8 | #ifndef _TYPE_DEF_H_ 9 | #define _TYPE_DEF_H_ 10 | 11 | typedef char I8; 12 | typedef unsigned char U8; 13 | typedef short I16; 14 | typedef unsigned short U16; 15 | typedef long I32; 16 | typedef unsigned long U32; 17 | typedef unsigned long long U64; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/power_management.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __POWER_MANAGEMENT_H__ 4 | #define __POWER_MANAGEMENT_H__ 5 | #include 6 | 7 | #define LPW_NONE 0xff 8 | #define LPW_NOMAL 0 9 | #define LPW_LEVEL_1 1 10 | #define LPW_LEVEL_2 2 11 | #define LPW_LEVEL_3 3 12 | 13 | extern uint8_t lpwMode; 14 | uint32_t SetLowPowerModes(uint8_t mode); 15 | void LowPowerModes(uint8_t mode); 16 | 17 | #endif 18 | 19 | 20 | -------------------------------------------------------------------------------- /firmware/source/src/FATFS/ff9b/src/flash_mem.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __FLASH_MEM_H__ 4 | #define __FLASH_MEM_H__ 5 | #include "diskio.h" 6 | #include 7 | 8 | DSTATUS MMC_disk_initialize(void); 9 | DSTATUS SST25_disk_status(void); 10 | DRESULT SST25_disk_read(BYTE *buff, DWORD sector, BYTE count); 11 | DRESULT SST25_disk_write(BYTE *buff, DWORD sector, BYTE count); 12 | uint32_t get_fattime(void); 13 | DRESULT SST25_disk_ioctl(BYTE ctrl, void* buff); 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/median.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Archivo: mediana.c 4 | Calcula la mediana de un buffer de 8 muestras 5 | Fecha: 29/07/04 6 | */ 7 | 8 | #define NUM_MUESTRAS_MEDIANA 8 9 | 10 | struct tipo_mediana 11 | { 12 | unsigned char ap_muestras; 13 | int buffer_muestras[NUM_MUESTRAS_MEDIANA]; 14 | }; 15 | 16 | int median(int nuevo_valor, struct tipo_mediana *medicion); 17 | 18 | extern struct tipo_mediana arr_medianas[]; 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /firmware/source/src/common/startup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: startup.h 3 | * Purpose: Initialize memory and zero out zero regions. Move necessary code 4 | * to RAM. 5 | * 6 | * Notes: 7 | */ 8 | 9 | #ifndef _STARTUP_H_ 10 | #define _STARTUP_H_ 11 | 12 | /********************************************************************/ 13 | 14 | void common_startup(void); 15 | 16 | /********************************************************************/ 17 | 18 | #endif /* _STARTUP_H_ */ 19 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: LQRUG_uart_ex1.c 3 | * Purpose: Main process 4 | * 5 | */ 6 | 7 | #include "common.h" 8 | #include "start.h" 9 | 10 | /********************************************************************/ 11 | int main (void) 12 | { 13 | #ifdef CMSIS // If we are conforming to CMSIS, we need to call start here 14 | start(); 15 | #endif 16 | 17 | while (1); 18 | } 19 | /********************************************************************/ 20 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/spi/spi.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPI_H__ 2 | #define __SPI_H__ 3 | #include "common.h" 4 | #include 5 | 6 | 7 | #define SPI_TIMEOUT 100000 8 | 9 | 10 | 11 | #define HAL_SPI_CS_DEASSERT GPIOD_PSOR |= 1 << 2 12 | #define HAL_SPI_CS_ASSERT GPIOD_PCOR |= 1 << 2 13 | 14 | #define HAL_SPI_ACCEL_CS_DEASSERT GPIOA_PSOR |= 1 << 2 15 | #define HAL_SPI_ACCEL_CS_ASSERT GPIOA_PCOR |= 1 << 2 16 | 17 | 18 | uint8_t halSpiWriteByte(uint8_t data); 19 | void SPI_Init(void); 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbdesc.d: -------------------------------------------------------------------------------- 1 | .\flash\usbdesc.o: ..\..\..\src\projects\project_main\usbdesc.c 2 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\usbdesc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\cdc.h 5 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\msc.h 6 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\hid.h 7 | .\flash\usbdesc.o: ..\..\..\src\projects\project_main\usbcfg.h 8 | .\flash\usbdesc.o: ..\..\..\src\projects\project_main\usbdesc.h 9 | -------------------------------------------------------------------------------- /firmware/source/copy.bat: -------------------------------------------------------------------------------- 1 | set workspace=D:\03_Workspace\01_AMBO\Personal_Tracking\GT1022Firmware\build 2 | set svn_workspace=build 3 | rmdir %svn_workspace% /S /Q 4 | mkdir %svn_workspace% 5 | xcopy %workspace%\* %svn_workspace%\* /e /exclude:exclude_list.txt 6 | 7 | set workspace=D:\03_Workspace\01_AMBO\Personal_Tracking\GT1022Firmware\src 8 | set svn_workspace=src 9 | rmdir %svn_workspace% /S /Q 10 | mkdir %svn_workspace% 11 | xcopy %workspace%\* %svn_workspace%\* /e 12 | 13 | set workspace= 14 | set svn_workspace= 15 | 16 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/angle_cal.h: -------------------------------------------------------------------------------- 1 | 2 | /*Acceleration RAM */ 3 | extern signed int X_acc; 4 | extern signed int Y_acc; 5 | extern signed int Z_acc; 6 | 7 | extern unsigned int xy_mag; 8 | extern unsigned int xz_mag; 9 | extern unsigned int yz_mag; 10 | 11 | extern signed int xy_angle; 12 | extern signed int xz_angle; 13 | extern signed int yz_angle; 14 | 15 | extern unsigned char fall_input; 16 | 17 | extern void angle_calculation(void); 18 | void detect_fall_detection(void); 19 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/cmp/cmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: cmp.h 3 | * Purpose: Provide common ColdFire UART routines for polled serial IO 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef __CMP_H__ 9 | #define __CMP_H__ 10 | 11 | /********************************************************************/ 12 | // Function prototypes 13 | void cmp_init ( unsigned char rising_falling ) ; 14 | void cmp0_isr(void); 15 | 16 | 17 | /********************************************************************/ 18 | 19 | #endif /* __CMP_H__ */ 20 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/rcm/rcm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: rcm.h 3 | * Purpose: Provides routines for the reset controller module 4 | * 5 | */ 6 | 7 | #ifndef __RCM_H__ 8 | #define __RCM_H__ 9 | 10 | /********************************************************************/ 11 | 12 | // function prototypes 13 | /* This function sends the status of the SRS register to the terminal*/ 14 | void outSRS(void); 15 | 16 | 17 | /********************************************************************/ 18 | #endif /* __RCM_H__ */ 19 | -------------------------------------------------------------------------------- /firmware/source/src/common/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: io.h 3 | * Purpose: Serial Input/Output routines 4 | * 5 | */ 6 | 7 | #ifndef _IO_H 8 | #define _IO_H 9 | 10 | /********************************************************************/ 11 | 12 | char 13 | in_char(void); 14 | 15 | void 16 | out_char(char); 17 | 18 | int 19 | char_present(void); 20 | 21 | int 22 | printf(const char *, ... ); 23 | 24 | int 25 | sprintf(char *, const char *, ... ); 26 | 27 | /********************************************************************/ 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/rtc/rtc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: rtc.h 3 | * Purpose: Provide common rtc functions 4 | * 5 | * Notes: 6 | */ 7 | #include "common.h" 8 | #ifndef __RTC_H__ 9 | #define __RTC_H__ 10 | 11 | /********************************************************************/ 12 | 13 | void rtc_init(uint32 seconds, uint32 alarm, uint8 c_interval, uint8 c_value, uint8 interrupt); 14 | void rtc_isr(void); 15 | void rtc_reg_report (void); 16 | 17 | /********************************************************************/ 18 | 19 | #endif /* __RTC_H__ */ 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_mkl25z4.d: -------------------------------------------------------------------------------- 1 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\system_MKL25Z4.c 2 | .\flash\system_mkl25z4.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 3 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 4 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 5 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/system_mkl25z4.d: -------------------------------------------------------------------------------- 1 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\system_MKL25Z4.c 2 | .\flash\system_mkl25z4.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 3 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 4 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 5 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\system_mkl25z4.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\system_mkl25z4.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbdesc.d: -------------------------------------------------------------------------------- 1 | .\flash\usbdesc.o: ..\..\..\src\projects\project_bootloader\usbdesc.c 2 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\usbdesc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbdesc.o: ..\..\..\src\projects\project_bootloader\cdc.h 5 | .\flash\usbdesc.o: ..\..\..\src\projects\project_bootloader\msc.h 6 | .\flash\usbdesc.o: ..\..\..\src\drivers\usb\hid.h 7 | .\flash\usbdesc.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 8 | .\flash\usbdesc.o: ..\..\..\src\projects\project_bootloader\usbdesc.h 9 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/pedometer/ambo_pedometer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ambo_pedometer.h 3 | * blue@ambo.com.vn 4 | * AMBO TECH Inc. 5 | */ 6 | 7 | #ifndef __AMBO_PEDOMETER_H__ 8 | #define __AMBO_PEDOMETER_H__ 9 | 10 | #include 11 | 12 | #ifndef NULL 13 | #define NULL (0) 14 | #endif 15 | extern uint16_t step_cnt; 16 | extern uint16_t disp_trip; 17 | extern uint16_t cnt_flg; 18 | extern uint16_t no_cnt_flg; 19 | void ambo_pedometer_init(void); 20 | uint16_t ambo_step_detect(void); 21 | uint16_t ambo_pedometer_sample_update(int16_t x,uint16_t y,uint16_t z); 22 | #endif 23 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/app.c: -------------------------------------------------------------------------------- 1 | #include "start.h" 2 | #include "common.h" 3 | #include "uart.h" 4 | #include "usb.h" 5 | #include "usbcfg.h" 6 | #include "usbhw.h" 7 | #include "usbcore.h" 8 | #include "cdc.h" 9 | #include "cdcuser.h" 10 | #include "tick.h" 11 | #include "dbg_cfg_app.h" 12 | #include "system_config.h" 13 | #include "spi.h" 14 | #include "sst25.h" 15 | #include "MKL25Z4.h" 16 | #include "ff.h" 17 | #include "diskio.h" 18 | #include "project_common.h" 19 | #include "audio.h" 20 | 21 | 22 | 23 | 24 | 25 | void RunApplication(void) 26 | { 27 | 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/download_config_task.h: -------------------------------------------------------------------------------- 1 | #ifndef _DOWNLOAD_CONFIG_TASK_H_ 2 | #define _DOWNLOAD_CONFIG_TASK_H_ 3 | 4 | void DownloadConfigTask_Init(void); 5 | uint8_t DownloadConfigTask_Start(void); 6 | uint8_t DownloadConfigTask_IsWaitingForRetry(void); 7 | uint8_t DownloadConfigTask_IsWaitingForRetryTimedOut(void); 8 | GPRS_PHASE_TYPE DownloadConfigTask_GetPhase(void); 9 | void DownloadConfigTask_SetPhase(GPRS_PHASE_TYPE taskPhase); 10 | void DownloadConfigTask_WakeUp(void); 11 | void DownloadConfigTask_Stop(void); 12 | uint8_t DownloadConfig_Task(void); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/project_main.uvmpw: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | WorkSpace 9 | 10 | 11 | .\project_main.uvproj 12 | 1 13 | 1 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/bsp/bsp_KL25.h: -------------------------------------------------------------------------------- 1 | 2 | #include "common.h" 3 | 4 | enum usb_clock 5 | { 6 | MCGPLL0, 7 | MCGFLL, 8 | CLKIN 9 | }; 10 | 11 | 12 | /* Select Clock source */ 13 | #define USB_CLOCK MCGPLL0 14 | //#define USB_CLOCK MCGFLL 15 | //#define USB_CLOCK CLKIN 16 | 17 | /* USB Fractional Divider value for 120MHz input */ 18 | /** USB Clock = PLL x (FRAC +1) / (DIV+1) */ 19 | /** USB Clock = 48MHz x (0+1) / (0+1) = 48 MHz */ 20 | #define USB_FRAC 0 21 | #define USB_DIV SIM_CLKDIV2_USBFSDIV(0) 22 | 23 | 24 | 25 | void vfnInitUSBClock (uint8 u8ClkOption); 26 | 27 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/project_common.d: -------------------------------------------------------------------------------- 1 | .\flash\project_common.o: ..\..\..\src\projects\project_main\project_common.c 2 | .\flash\project_common.o: ..\..\..\src\projects\project_main\project_common.h 3 | .\flash\project_common.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 4 | .\flash\project_common.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\project_common.o: ..\..\..\src\FATFS\ff9b\src\ff.h 6 | .\flash\project_common.o: ..\..\..\src\FATFS\ff9b\src\integer.h 7 | .\flash\project_common.o: ..\..\..\src\FATFS\ff9b\src\ffconf.h 8 | .\flash\project_common.o: ..\..\..\src\FATFS\ff9b\src\diskio.h 9 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/upload_config_task.h: -------------------------------------------------------------------------------- 1 | #ifndef _UPLOAD_CONFIG_TASK_H_ 2 | #define _UPLOAD_CONFIG_TASK_H_ 3 | 4 | void UploadConfigTask_Init(void); 5 | uint8_t UploadConfigTask_Start(void); 6 | uint8_t UploadConfigTask_IsWaitingForRetry(void); 7 | uint8_t UploadConfigTask_IsWaitingForRetryTimedOut(void); 8 | GPRS_PHASE_TYPE UploadConfigTask_GetPhase(void); 9 | void UploadConfigTask_SetPhase(GPRS_PHASE_TYPE taskPhase); 10 | void UploadConfigTask_WakeUp(void); 11 | void UploadConfigTask_Stop(void); 12 | void UploadConfigTask_StopAll(void); 13 | uint8_t UploadConfig_Task(void); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/project_bootloader.uvmpw: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | WorkSpace 9 | 10 | 11 | .\project_bootloader.uvproj 12 | 1 13 | 1 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/sqrt16.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \brief Calculates the square root of the value 3 | * \author Luis Puebla 4 | * \param value 5 | * \return (unsigend long)square root 6 | * \todo 7 | * \warning 8 | */ 9 | unsigned int sqrt_16(unsigned int value) 10 | { 11 | unsigned char num_iter=0; 12 | unsigned long result = 1000; 13 | unsigned long last_result = 1000; 14 | do 15 | { 16 | last_result = result; 17 | result = (result + value/result)/2; 18 | } 19 | while (num_iter++<7 && last_result!= result); 20 | return (unsigned int)result; 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ringbuff/ringbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef _RING_BUF_H_ 2 | #define _RING_BUF_H_ 3 | 4 | #include 5 | #include 6 | 7 | typedef struct 8 | { 9 | volatile uint32_t head; 10 | volatile uint32_t tail; 11 | volatile uint32_t size; 12 | volatile uint8_t *pt; 13 | } RINGBUF; 14 | 15 | extern RINGBUF UART2_RxRingBuff; 16 | 17 | int32_t RINGBUF_Init(RINGBUF *r, uint8_t* buf, uint32_t size); 18 | int32_t RINGBUF_Put(RINGBUF *r, uint8_t c); 19 | int32_t RINGBUF_Get(RINGBUF *r, uint8_t* c); 20 | int32_t RINGBUF_GetFill(RINGBUF *r); 21 | #endif 22 | -------------------------------------------------------------------------------- /firmware/source/src/common/assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: assert.h 3 | * Purpose: Provide macro for software assertions 4 | * 5 | * Notes: assert_failed() defined in assert.c 6 | */ 7 | 8 | #ifndef _ASSERT_H_ 9 | #define _ASSERT_H_ 10 | 11 | /********************************************************************/ 12 | 13 | void assert_failed(char *, int); 14 | 15 | #ifdef DEBUG_PRINT 16 | #define ASSERT(expr) \ 17 | if (!(expr)) \ 18 | assert_failed(__FILE__, __LINE__) 19 | #else 20 | #define ASSERT(expr) 21 | #endif 22 | 23 | /********************************************************************/ 24 | #endif /* _ASSERT_H_ */ 25 | 26 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x00000000 0x00020000 { ; load region size_region 6 | ER_IROM1 0x00000000 0x00020000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | } 11 | RW_IRAM1 0x1FFFF000 0x00001000 { ; RW data 12 | .ANY (+RW +ZI) 13 | } 14 | RW_IRAM2 0x20000000 0x00003000 { 15 | flash_ramFunc.o (+RO) 16 | .ANY (+RW +ZI) 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.sct: -------------------------------------------------------------------------------- 1 | ; ************************************************************* 2 | ; *** Scatter-Loading Description File generated by uVision *** 3 | ; ************************************************************* 4 | 5 | LR_IROM1 0x00000000 0x00020000 { ; load region size_region 6 | ER_IROM1 0x00000000 0x00020000 { ; load address = execution address 7 | *.o (RESET, +First) 8 | *(InRoot$$Sections) 9 | .ANY (+RO) 10 | } 11 | RW_IRAM1 0x1FFFF000 0x00001000 { ; RW data 12 | .ANY (+RW +ZI) 13 | } 14 | RW_IRAM2 0x20000000 0x00003000 { 15 | flash_ramFunc.o (+RO) 16 | .ANY (+RW +ZI) 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_bootloader/isr.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * File: isr.h 3 | * Purpose: Define interrupt service routines referenced by the vector table. 4 | * Note: Only "vectors.c" should include this header file. 5 | ******************************************************************************/ 6 | 7 | #ifndef __ISR_H 8 | #define __ISR_H 1 9 | 10 | 11 | /* Example */ 12 | /* 13 | #undef VECTOR_101 14 | #define VECTOR_101 lpt_isr 15 | 16 | 17 | // ISR(s) are defined in your project directory. 18 | extern void lpt_isr(void); 19 | */ 20 | 21 | 22 | #endif //__ISR_H 23 | 24 | /* End of "isr.h" */ 25 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/gps.d: -------------------------------------------------------------------------------- 1 | .\flash\gps.o: ..\..\..\src\Libraries\common_lib\gps\gps.c 2 | .\flash\gps.o: ..\..\..\src\Libraries\common_lib\gps\gps.h 3 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\stdarg.h 5 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 6 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 7 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\ctype.h 8 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 9 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\limits.h 10 | .\flash\gps.o: C:\Keil\ARM\ARMCC\bin\..\include\math.h 11 | .\flash\gps.o: ..\..\..\src\drivers\tick\tick.h 12 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/sysinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: sysinit.h 3 | * Purpose: Kinetis L Family Configuration 4 | * Initializes clock, abort button, clock output, and UART to a default state 5 | * 6 | * Notes: 7 | * 8 | */ 9 | 10 | /********************************************************************/ 11 | 12 | extern int mcg_clk_hz; 13 | extern int mcg_clk_khz; 14 | extern int core_clk_khz; 15 | extern int periph_clk_khz; 16 | extern int pll_clk_khz; 17 | extern int uart0_clk_khz; 18 | 19 | 20 | // function prototypes 21 | void sysinit (void); 22 | void enable_abort_button(void); 23 | void clk_out_init(void); 24 | /********************************************************************/ 25 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/audio.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __AUDIO_H__ 4 | #define __AUDIO_H__ 5 | #include 6 | 7 | #define NOW_PLAY 0 8 | #define TOP_INSERT 1 9 | #define BOT_INSERT 2 10 | #define STOP_ALL 3 11 | 12 | typedef enum{ 13 | AUDIO_GET_INFO = 0, 14 | AUDIO_PLAYING, 15 | AUDIO_STOP, 16 | AUDIO_STOPED 17 | } AUDIO_STATUS_TYPE; 18 | 19 | 20 | AUDIO_STATUS_TYPE AudioTask_GetPhase(void); 21 | void AUDIO_Init(void); 22 | void AudioControler(void); 23 | void AudioPlayFile(uint8_t *fileName,uint8_t insertType); 24 | void PlayVersion(char *versionStr, uint8_t insertType); 25 | uint8_t AudioStopCheck(void); 26 | void AudioStopAll(void); 27 | void AudioEnable(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/crt0.s: -------------------------------------------------------------------------------- 1 | /* 2 | * File: crt0.s 3 | * Purpose: Lowest level routines for Kinetis L Family. 4 | * 5 | * Notes: 6 | * 7 | */ 8 | 9 | 10 | ; AREA Crt0, CODE, READONLY ; name this block of code 11 | SECTION .noinit : CODE 12 | 13 | EXPORT __startup 14 | __startup 15 | LDR r0,=0 ; Initialize the GPRs 16 | LDR r1,=0 17 | LDR r2,=0 18 | LDR r3,=0 19 | LDR r4,=0 20 | LDR r5,=0 21 | LDR r6,=0 22 | LDR r7,=0 23 | 24 | CPSIE i ; Unmask interrupts 25 | import start 26 | BL start ; call the C code 27 | __done 28 | B __done 29 | 30 | END 31 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/lptmr/lptmr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: lptmr.h 3 | * Purpose: Provide common low power timer functions 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef __LPTMR_H__ 9 | #define __LPTMR_H__ 10 | 11 | /********************************************************************/ 12 | /* Miscellaneous defined */ 13 | 14 | #define LPTMR_USE_IRCLK 0 15 | #define LPTMR_USE_LPOCLK 1 16 | #define LPTMR_USE_ERCLK32 2 17 | #define LPTMR_USE_OSCERCLK 3 18 | 19 | /* Function prototypes */ 20 | void time_delay_ms(unsigned int count_val); 21 | void lptmr_isr(void); 22 | void lptmr_init(int count, int clock_source); 23 | 24 | /********************************************************************/ 25 | 26 | #endif /* __LPTMR_H__ */ 27 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_bootloader/sysinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: sysinit.h 3 | * Purpose: Kinetis L Family Configuration 4 | * Initializes clock, abort button, clock output, and UART to a default state 5 | * 6 | * Notes: 7 | * 8 | */ 9 | 10 | /********************************************************************/ 11 | 12 | extern int mcg_clk_hz; 13 | extern int mcg_clk_khz; 14 | extern int core_clk_khz; 15 | extern int periph_clk_khz; 16 | extern int pll_clk_khz; 17 | extern int uart0_clk_khz; 18 | 19 | 20 | // function prototypes 21 | void sysinit (void); 22 | void enable_abort_button(void); 23 | void clk_out_init(void); 24 | /********************************************************************/ 25 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/JLinkSettings.ini: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ShowInfoWin = 1 3 | EnableFlashBP = 2 4 | BPDuringExecution = 0 5 | [CFI] 6 | CFISize = 0x00 7 | CFIAddr = 0x00 8 | [CPU] 9 | OverrideMemMap = 0 10 | AllowSimulation = 1 11 | ScriptFile="" 12 | [FLASH] 13 | MinNumBytesFlashDL = 0 14 | SkipProgOnCRCMatch = 1 15 | VerifyDownload = 1 16 | AllowCaching = 1 17 | EnableFlashDL = 2 18 | Override = 0 19 | Device="UNSPECIFIED" 20 | [GENERAL] 21 | WorkRAMSize = 0x00 22 | WorkRAMAddr = 0x00 23 | [SWO] 24 | SWOLogFile="" 25 | [MEM] 26 | RdOverrideOrMask = 0x00 27 | RdOverrideAndMask = 0xFFFFFFFF 28 | RdOverrideAddr = 0xFFFFFFFF 29 | WrOverrideOrMask = 0x00 30 | WrOverrideAndMask = 0xFFFFFFFF 31 | WrOverrideAddr = 0xFFFFFFFF 32 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/acclerometer/accelerometer.h: -------------------------------------------------------------------------------- 1 | #ifndef __ACCELEROMETER_H__ 2 | #define __ACCELEROMETER_H__ 3 | 4 | #include 5 | 6 | #define MMA7660_ADR (0x4C << 1) 7 | 8 | /* REG MAP */ 9 | #define XOUT_REG 0x00 10 | #define YOUT_REG 0x01 11 | #define ZOUT_REG 0x02 12 | #define TILT_REG 0x03 13 | #define SRST_REG 0x04 14 | #define SPCNT_REG 0x05 15 | #define INTSU_REG 0x06 16 | #define MODE_REG 0x07 17 | #define SR_REG 0x08 18 | #define PDET_REG 0x09 19 | #define PD_REG 0x0A 20 | 21 | extern uint32_t acclInit; 22 | extern uint8_t acclFlag; 23 | uint8_t ACCL_Read(uint8_t reg); 24 | uint8_t AccelerometerInit(void); 25 | uint8_t ACCL_ReadStatus(void); 26 | uint8_t accel_read(void); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/cw_crt0.s: -------------------------------------------------------------------------------- 1 | /* 2 | * File: cw_crt0.s 3 | * Purpose: Lowest level routines for Kinetis. 4 | * 5 | * Notes: This is a CodeWarrior specific version of crt0.s 6 | * 7 | */ 8 | 9 | .extern start 10 | 11 | .global startup 12 | .global __startup 13 | 14 | .text 15 | .thumb_func 16 | .type __startup, %function 17 | 18 | startup: 19 | __startup: 20 | LDR r0,=0; /*Initialize the GPRs*/ 21 | LDR r1,=0; 22 | LDR r2,=0; 23 | LDR r3,=0; 24 | LDR r4,=0; 25 | LDR r5,=0; 26 | LDR r6,=0; 27 | LDR r7,=0; 28 | CPSIE i /* Unmask interrupts*/ 29 | BL start /* call the C code*/ 30 | done: 31 | B done 32 | 33 | .end 34 | -------------------------------------------------------------------------------- /firmware/source/build/keil/workspace.uvmpw: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | WorkSpace 9 | 10 | 11 | .\project_main\project_main.uvproj 12 | 1 13 | 1 14 | 15 | 16 | 17 | .\project_bootloader\project_bootloader.uvproj 18 | 1 19 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/isr.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * File: isr.h 3 | * Purpose: Define interrupt service routines referenced by the vector table. 4 | * Note: Only "vectors.c" should include this header file. 5 | ******************************************************************************/ 6 | 7 | #ifndef __ISR_H 8 | #define __ISR_H 1 9 | 10 | 11 | /* Example */ 12 | /* 13 | #undef VECTOR_101 14 | #define VECTOR_101 lpt_isr 15 | 16 | 17 | // ISR(s) are defined in your project directory. 18 | extern void lpt_isr(void); 19 | */ 20 | extern void uart0_isr(void); 21 | 22 | #undef VECTOR_028 23 | #define VECTOR_028 uart0_isr 24 | 25 | #endif //__ISR_H 26 | 27 | /* End of "isr.h" */ 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ampm_personal_tracker 2 | Security and safety is an essential feature for this product.Hence, it is extremely 3 | critical to ensure the unit is able to make the SOS call and send the timely and 4 | accurate GPS location to the dedicated party. 5 | . 6 | The GPS tracker shall be able to send GPS location, making emergency voice call 7 | by pressing SOS button. In order to provide quick and accurate GPS location, cell 8 | ID and AGPS technology is incorporated in this device. The data (GPS location, 9 | remaining battery capacity etc.) shall be sent by both GPRS and SMS (the choice 10 | will be determined in the detail logic flow and MMI document). 11 | GSM frequency. Quad band 850/900/1800/1900. 12 | GPRS type – Class 10, TCP/IP build in 13 | GPS sensitivity - 159 dBm 14 | -------------------------------------------------------------------------------- /firmware/source/src/common/typedef.h: -------------------------------------------------------------------------------- 1 | #ifndef __TYPEDEF_H__ 2 | #define __TYPEDEF_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #ifndef s8 9 | #define s8 char 10 | #endif 11 | #ifndef u8 12 | #define u8 unsigned char 13 | #endif 14 | #ifndef s16 15 | #define s16 short 16 | #endif 17 | #ifndef u16 18 | #define u16 unsigned short 19 | #endif 20 | #ifndef s32 21 | #define s32 long 22 | #endif 23 | #ifndef u32 24 | #define u32 unsigned long 25 | #endif 26 | #ifndef sint 27 | #define sint int 28 | #endif 29 | #ifndef uint 30 | #define uint unsigned int 31 | #endif 32 | #ifndef s64 33 | #define s64 long long 34 | #endif 35 | #ifndef u64 36 | #define u64 unsigned long long 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* __TYPEDEF_H__ */ -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/GT1022_BOOT.lnp: -------------------------------------------------------------------------------- 1 | --cpu Cortex-M0+ 2 | ".\flash\flashprog.o" 3 | ".\flash\project_bootloader.o" 4 | ".\flash\system_mkl25z4.o" 5 | ".\flash\sysinit.o" 6 | ".\flash\startup_mkl25z4.o" 7 | ".\flash\spi.o" 8 | ".\flash\fmc.o" 9 | ".\flash\ringbuf.o" 10 | ".\flash\flash_ftfa.o" 11 | ".\flash\flash_ramfunc.o" 12 | ".\flash\hiduser.o" 13 | ".\flash\usbcore.o" 14 | ".\flash\usbhw.o" 15 | ".\flash\usbdesc.o" 16 | ".\flash\usbuser.o" 17 | ".\flash\mscuser.o" 18 | ".\flash\cdcuser.o" 19 | ".\flash\sst25.o" 20 | --library_type=microlib --strict --scatter ".\Flash\GT1022_BOOT.sct" 21 | --summary_stderr --info summarysizes --map --xref --callgraph --symbols 22 | --info sizes --info totals --info unused --info veneers 23 | --list ".\UV4Build\GT1022_BOOT.map" -o .\Flash\GT1022_BOOT.axf -------------------------------------------------------------------------------- /firmware/source/src/common/assert.c: -------------------------------------------------------------------------------- 1 | /* 2 | * File: assert.c 3 | * Purpose: Provide macro for software assertions 4 | * 5 | * Notes: ASSERT macro defined in assert.h calls assert_failed() 6 | */ 7 | 8 | #include "common.h" 9 | 10 | const char ASSERT_FAILED_STR[] = "Assertion failed in %s at line %d\n"; 11 | 12 | /********************************************************************/ 13 | void 14 | assert_failed(char *file, int line) 15 | { 16 | int i; 17 | 18 | printf(ASSERT_FAILED_STR, file, line); 19 | 20 | while (1) 21 | { 22 | // platform_led_display(0xFF); 23 | for (i = 100000; i; i--) ; 24 | // platform_led_display(0x00); 25 | for (i = 100000; i; i--) ; 26 | } 27 | } 28 | /********************************************************************/ 29 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/smc/smc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: smc.h 3 | * Purpose: Provides low power mode entry routines 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef __SMC_H__ 9 | #define __SMC_H__ 10 | 11 | /********************************************************************/ 12 | 13 | // function prototypes 14 | void sleep(void); 15 | void deepsleep(void); 16 | void enter_wait(void); 17 | void enter_stop(unsigned char partial_stop_opt); 18 | int enter_vlpr(void); 19 | void exit_vlpr(void); 20 | void enter_vlps(void); 21 | void enter_lls(void); 22 | void enter_vlls3(void); 23 | void enter_vlls2(void); 24 | void enter_vlls1(void); 25 | void enter_vlls0(unsigned char PORPO_value); 26 | void enter_vlls0_nopor(void); 27 | 28 | /********************************************************************/ 29 | #endif /* __SMC_H__ */ 30 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbhw.d: -------------------------------------------------------------------------------- 1 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbhw.c 2 | .\flash\usbhw.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.H 3 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 4 | .\flash\usbhw.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\usbhw.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usb.h 9 | .\flash\usbhw.o: ..\..\..\src\projects\project_main\usbcfg.h 10 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbreg.h 11 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbhw.h 12 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbcore.h 13 | .\flash\usbhw.o: ..\..\..\src\projects\project_main\usbuser.h 14 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbhw.d: -------------------------------------------------------------------------------- 1 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbhw.c 2 | .\flash\usbhw.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.H 3 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 4 | .\flash\usbhw.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\usbhw.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\usbhw.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usb.h 9 | .\flash\usbhw.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 10 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbreg.h 11 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbhw.h 12 | .\flash\usbhw.o: ..\..\..\src\drivers\usb\usbcore.h 13 | .\flash\usbhw.o: ..\..\..\src\projects\project_bootloader\usbuser.h 14 | -------------------------------------------------------------------------------- /firmware/source/audio/00/text.txt: -------------------------------------------------------------------------------- 1 | 1_1_Power_ON 2 | 1_2_Power_OFF 3 | 2_1_Battery_OK 4 | 2_2_Recharge_Battery_Soon 5 | 2_4_No_Service_Coverage 6 | 2_5_No_current_GPS_Fix 7 | 2_6_GPS_OK 8 | 2_7_Service_Coverage_OK 9 | 3_1_EMERGENCY_call_is_being_placed 10 | 3_2_Please_stand_by 11 | 3_3_Hanging_Up 12 | 3_4_Hanging_up_and_dialing_next_number 13 | 3_5_This_is_emergency_call 14 | 3_6_SOS_failed 15 | 3_7_SOS_cancelled 16 | 4_1_Dialing_911 17 | 4_2_Please_wait_for_call_back 18 | 5_1_Are_you_OK_Press_test_button 19 | 5_3_Lone_Worker_ON 20 | 5_4_Lone_Worker_Off 21 | 5_5_Beep 22 | 6_1_Point 23 | 6_3_There_is_no_answer 24 | 6_4_Failed_to_connect_trying_again 25 | 6_5_Call_unsuccessful 26 | 6_6_Dialing 27 | 6_7_Version_no 28 | 6_8_Caller_id 29 | 6_9_The_line_is_busy 30 | 0_Zero 31 | 1_One 32 | 2_Two 33 | 3_Three 34 | 4_Four 35 | 5_Five 36 | 6_Six 37 | 7_Seven 38 | 8_Eight 39 | 9_Nine 40 | ring_ring 41 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ppp/xtea.c: -------------------------------------------------------------------------------- 1 | 2 | #include "typedef.h" 3 | 4 | void XTEA_Encrypt(U16 num_rounds, U32 v[2], U32 const k[4]) 5 | { 6 | U16 i; 7 | U32 v0=v[0], v1=v[1], sum=0, delta=0x9E3779B9; 8 | 9 | for (i=0; i < num_rounds; i++) { 10 | v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]); 11 | sum += delta; 12 | v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum>>11) & 3]); 13 | } 14 | v[0]=v0; v[1]=v1; 15 | } 16 | 17 | void XTEA_Decrypt(U16 num_rounds, U32 v[2], U32 const k[4]) 18 | { 19 | U16 i; 20 | U32 v0=v[0], v1=v[1], delta=0x9E3779B9, sum=delta*num_rounds; 21 | 22 | for (i=0; i < num_rounds; i++) { 23 | v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum>>11) & 3]); 24 | sum -= delta; 25 | v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]); 26 | } 27 | v[0]=v0; v[1]=v1; 28 | } 29 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/pedometer/pedometer_task.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __PEDOMETER_TASK_H__ 4 | #define __PEDOMETER_TASK_H__ 5 | 6 | 7 | typedef struct 8 | { 9 | unsigned short stepCount; 10 | unsigned short lastStepCount; 11 | unsigned char updateReadyFlag; 12 | 13 | }PEDOMETER_TYPE; 14 | 15 | typedef struct __attribute__((packed)){ 16 | int8_t x; 17 | int8_t y; 18 | int8_t z; 19 | uint8_t status; 20 | uint16_t fifo_samples; 21 | int16_t x16; 22 | int16_t y16; 23 | int16_t z16; 24 | int16_t temp; 25 | int16_t adc; 26 | } XL362_Type; 27 | 28 | typedef enum 29 | { 30 | FACE_UP = 0, 31 | FACE_DOWN, 32 | SIDE_UP, 33 | SIDE_DOWN, 34 | OTHER_POSITION 35 | }DEVICE_POSITION; 36 | 37 | extern XL362_Type xl362; 38 | extern PEDOMETER_TYPE Pedometer; 39 | extern DEVICE_POSITION devicePosition; 40 | void PedometerTaskInit(void); 41 | void PedometerTask(void); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/sys_time/sys_time.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYS_TIME_H__ 2 | #define __SYS_TIME_H__ 3 | 4 | #include 5 | #include "gps.h" 6 | 7 | 8 | 9 | 10 | #define TIME_ZONE (+7) 11 | 12 | typedef struct __attribute__((packed)){ 13 | int16_t year; // year with all 4-digit (2011) 14 | int8_t month; // month 1 - 12 (1 = Jan) 15 | int8_t mday; // day of month 1 - 31 16 | int8_t wday; // day of week 1 - 7 (1 = Sunday) 17 | int8_t hour; // hour 0 - 23 18 | int8_t min; // min 0 - 59 19 | int8_t sec; // sec 0 - 59 20 | }DATE_TIME; 21 | 22 | extern DATE_TIME sysTime; 23 | extern uint32_t timeZone; 24 | 25 | int8_t TIME_AddSec(DATE_TIME *t, int32_t sec); 26 | int32_t TIME_GetSec(DATE_TIME *t); 27 | int8_t TIME_FromSec(DATE_TIME *t, int32_t sec); 28 | int8_t TIME_FromGps(DATE_TIME *t, nmeaINFO *nmeaInfo); 29 | int8_t TIME_FromGsm(DATE_TIME *t, DATE_TIME *time); 30 | 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/mcg.d: -------------------------------------------------------------------------------- 1 | .\flash\mcg.o: ..\..\..\src\drivers\mcg\mcg.c 2 | .\flash\mcg.o: ..\..\..\src\common\common.h 3 | .\flash\mcg.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\mcg.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\mcg.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\mcg.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\mcg.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\mcg.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\mcg.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\mcg.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\mcg.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\mcg.o: ..\..\..\src\common\assert.h 13 | .\flash\mcg.o: ..\..\..\src\common\io.h 14 | .\flash\mcg.o: ..\..\..\src\common\startup.h 15 | .\flash\mcg.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\mcg.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sys_time.d: -------------------------------------------------------------------------------- 1 | .\flash\sys_time.o: ..\..\..\src\Libraries\common_lib\sys_time\sys_time.c 2 | .\flash\sys_time.o: ..\..\..\src\Libraries\common_lib\sys_time\sys_time.h 3 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\time.h 4 | .\flash\sys_time.o: ..\..\..\src\Libraries\common_lib\gps\gps.h 5 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 6 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\stdarg.h 7 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 8 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 9 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\ctype.h 10 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 11 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\limits.h 12 | .\flash\sys_time.o: C:\Keil\ARM\ARMCC\bin\..\include\math.h 13 | .\flash\sys_time.o: ..\..\..\src\drivers\tick\tick.h 14 | .\flash\sys_time.o: ..\..\..\src\Libraries\common_lib\sys_time\m_time.h 15 | -------------------------------------------------------------------------------- /firmware/source/src/common/queue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: queue.h 3 | * Purpose: Implement a first in, first out linked list 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef _QUEUE_H_ 9 | #define _QUEUE_H_ 10 | 11 | /********************************************************************/ 12 | 13 | /* 14 | * Individual queue node 15 | */ 16 | typedef struct NODE 17 | { 18 | struct NODE *next; 19 | } QNODE; 20 | 21 | /* 22 | * Queue Struture - linked list of qentry items 23 | */ 24 | typedef struct 25 | { 26 | QNODE *head; 27 | QNODE *tail; 28 | } QUEUE; 29 | 30 | /* 31 | * Functions provided by queue.c 32 | */ 33 | void 34 | queue_init(QUEUE *); 35 | 36 | int 37 | queue_isempty(QUEUE *); 38 | 39 | void 40 | queue_add(QUEUE *, QNODE *); 41 | 42 | QNODE* 43 | queue_remove(QUEUE *); 44 | 45 | QNODE* 46 | queue_peek(QUEUE *); 47 | 48 | void 49 | queue_move(QUEUE *, QUEUE *); 50 | 51 | /********************************************************************/ 52 | 53 | #endif /* _QUEUE_H_ */ 54 | -------------------------------------------------------------------------------- /firmware/source/src/FATFS/ff9b/src/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _INTEGER 6 | #define _INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* These types must be 16-bit, 32-bit or larger integer */ 16 | typedef int INT; 17 | typedef unsigned int UINT; 18 | 19 | /* These types must be 8-bit integer */ 20 | typedef char CHAR; 21 | typedef unsigned char UCHAR; 22 | typedef unsigned char BYTE; 23 | 24 | /* These types must be 16-bit integer */ 25 | typedef short SHORT; 26 | typedef unsigned short USHORT; 27 | typedef unsigned short WORD; 28 | typedef unsigned short WCHAR; 29 | 30 | /* These types must be 32-bit integer */ 31 | typedef long LONG; 32 | typedef unsigned long ULONG; 33 | typedef unsigned long DWORD; 34 | 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/string_parser/string_parser.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __STRING_PARSER_H__ 4 | #define __STRING_PARSER_H__ 5 | 6 | #define STR_PARSER_SIZE 32 7 | #define STR_PARSER_COUNT(x) (sizeof (x) / sizeof (x[0])) 8 | 9 | /*String Info definitions structure. */ 10 | typedef struct { 11 | char strInfo[STR_PARSER_SIZE]; 12 | char (*func)(char c); 13 | } STR_INFO_Type; 14 | 15 | typedef enum{ 16 | STR_NEW_STATE, 17 | STR_WAIT_FINISH, 18 | STR_FINISH 19 | }STR_STATE_Type; 20 | 21 | 22 | typedef struct { 23 | STR_STATE_Type state; 24 | uint16_t dataRecvLength; 25 | uint16_t dataRecvMaxLength; 26 | uint8_t strParserCntMax; 27 | uint8_t strInProcess; 28 | uint32_t timeout; 29 | uint32_t timeoutSet; 30 | } STR_PARSER_Type; 31 | 32 | void StrParserInit(STR_PARSER_Type *process,uint8_t *numCharParsed,uint8_t strParserCntMax,uint16_t dataLengthMax); 33 | void StrComnandParser(const STR_INFO_Type *info,STR_PARSER_Type *process,uint8_t *numCharParsed,uint8_t c); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/i2c/hal_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_I2C_H__ 2 | #define __HAL_I2C_H__ 3 | 4 | 5 | 6 | /* ---------------------------------------------------------------------------- 7 | -- I2C 8 | ---------------------------------------------------------------------------- */ 9 | 10 | 11 | void i2c_set_tx_mode(I2C_MemMapPtr p); 12 | void i2c_set_rx_mode(I2C_MemMapPtr p); 13 | void i2c_set_slave_mode(I2C_MemMapPtr p); 14 | void i2c_set_master_mode(I2C_MemMapPtr p); 15 | void i2c_give_nack(I2C_MemMapPtr p); 16 | void i2c_give_ack(I2C_MemMapPtr p); 17 | void i2c_repeated_start(I2C_MemMapPtr p); 18 | void i2c_write_byte(I2C_MemMapPtr p, uint8 data); 19 | uint8 i2c_read_byte(I2C_MemMapPtr p); 20 | void i2c_start(I2C_MemMapPtr p); 21 | void i2c_stop(I2C_MemMapPtr p); 22 | void i2c_wait(I2C_MemMapPtr p); 23 | uint16 i2c_get_ack(I2C_MemMapPtr p); 24 | void hal_i2c_init(I2C_MemMapPtr p); 25 | void hal_i2c_deinit(I2C_MemMapPtr p); 26 | #define I2C_READ 1 27 | #define I2C_WRITE 0 28 | 29 | #endif //__HAL_I2C_H__ 30 | 31 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/smc.d: -------------------------------------------------------------------------------- 1 | .\flash\smc.o: ..\..\..\src\drivers\smc\smc.c 2 | .\flash\smc.o: ..\..\..\src\common\common.h 3 | .\flash\smc.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\smc.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\smc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\smc.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\smc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\smc.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\smc.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\smc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\smc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\smc.o: ..\..\..\src\common\assert.h 13 | .\flash\smc.o: ..\..\..\src\common\io.h 14 | .\flash\smc.o: ..\..\..\src\common\startup.h 15 | .\flash\smc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\smc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\smc.o: ..\..\..\src\drivers\smc\smc.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/spi.d: -------------------------------------------------------------------------------- 1 | .\flash\spi.o: ..\..\..\src\drivers\spi\spi.c 2 | .\flash\spi.o: ..\..\..\src\drivers\spi\spi.h 3 | .\flash\spi.o: ..\..\..\src\common\common.h 4 | .\flash\spi.o: ..\..\..\src\platforms\freedom.h 5 | .\flash\spi.o: ..\..\..\src\drivers\mcg\mcg.h 6 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 7 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 8 | .\flash\spi.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 9 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 10 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 11 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 12 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 13 | .\flash\spi.o: ..\..\..\src\common\assert.h 14 | .\flash\spi.o: ..\..\..\src\common\io.h 15 | .\flash\spi.o: ..\..\..\src\common\startup.h 16 | .\flash\spi.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 17 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/fmc.d: -------------------------------------------------------------------------------- 1 | .\flash\fmc.o: ..\..\..\src\drivers\flash\fmc.c 2 | .\flash\fmc.o: ..\..\..\src\common\common.h 3 | .\flash\fmc.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\fmc.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\fmc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\fmc.o: ..\..\..\src\common\assert.h 13 | .\flash\fmc.o: ..\..\..\src\common\io.h 14 | .\flash\fmc.o: ..\..\..\src\common\startup.h 15 | .\flash\fmc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\fmc.o: ..\..\..\src\drivers\flash\fmc.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/fmc.d: -------------------------------------------------------------------------------- 1 | .\flash\fmc.o: ..\..\..\src\drivers\flash\fmc.c 2 | .\flash\fmc.o: ..\..\..\src\common\common.h 3 | .\flash\fmc.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\fmc.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\fmc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\fmc.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\fmc.o: ..\..\..\src\common\assert.h 13 | .\flash\fmc.o: ..\..\..\src\common\io.h 14 | .\flash\fmc.o: ..\..\..\src\common\startup.h 15 | .\flash\fmc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\fmc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\fmc.o: ..\..\..\src\drivers\flash\fmc.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/spi.d: -------------------------------------------------------------------------------- 1 | .\flash\spi.o: ..\..\..\src\drivers\spi\spi.c 2 | .\flash\spi.o: ..\..\..\src\drivers\spi\spi.h 3 | .\flash\spi.o: ..\..\..\src\common\common.h 4 | .\flash\spi.o: ..\..\..\src\platforms\freedom.h 5 | .\flash\spi.o: ..\..\..\src\drivers\mcg\mcg.h 6 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 7 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 8 | .\flash\spi.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 9 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 10 | .\flash\spi.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 11 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 12 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 13 | .\flash\spi.o: ..\..\..\src\common\assert.h 14 | .\flash\spi.o: ..\..\..\src\common\io.h 15 | .\flash\spi.o: ..\..\..\src\common\startup.h 16 | .\flash\spi.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 17 | .\flash\spi.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hal_i2c.d: -------------------------------------------------------------------------------- 1 | .\flash\hal_i2c.o: ..\..\..\src\drivers\i2c\hal_i2c.c 2 | .\flash\hal_i2c.o: ..\..\..\src\common\common.h 3 | .\flash\hal_i2c.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\hal_i2c.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\hal_i2c.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\hal_i2c.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\hal_i2c.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\hal_i2c.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\hal_i2c.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\hal_i2c.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\hal_i2c.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\hal_i2c.o: ..\..\..\src\common\assert.h 13 | .\flash\hal_i2c.o: ..\..\..\src\common\io.h 14 | .\flash\hal_i2c.o: ..\..\..\src\common\startup.h 15 | .\flash\hal_i2c.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\hal_i2c.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sysinit.d: -------------------------------------------------------------------------------- 1 | .\flash\sysinit.o: ..\..\..\src\cpu\sysinit.c 2 | .\flash\sysinit.o: ..\..\..\src\common\common.h 3 | .\flash\sysinit.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\sysinit.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\sysinit.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\sysinit.o: ..\..\..\src\common\assert.h 13 | .\flash\sysinit.o: ..\..\..\src\common\io.h 14 | .\flash\sysinit.o: ..\..\..\src\common\startup.h 15 | .\flash\sysinit.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\sysinit.o: ..\..\..\src\cpu\sysinit.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/llwu.d: -------------------------------------------------------------------------------- 1 | .\flash\llwu.o: ..\..\..\src\drivers\llwu\llwu.c 2 | .\flash\llwu.o: ..\..\..\src\common\common.h 3 | .\flash\llwu.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\llwu.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\llwu.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\llwu.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\llwu.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\llwu.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\llwu.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\llwu.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\llwu.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\llwu.o: ..\..\..\src\common\assert.h 13 | .\flash\llwu.o: ..\..\..\src\common\io.h 14 | .\flash\llwu.o: ..\..\..\src\common\startup.h 15 | .\flash\llwu.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\llwu.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\llwu.o: ..\..\..\src\drivers\llwu\llwu.h 18 | .\flash\llwu.o: ..\..\..\src\cpu\vectors.h 19 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/uart/Serial.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | * Name: Serial.c 3 | * Purpose: Low Level Serial Definitions 4 | *----------------------------------------------------------------------------- 5 | * This file is part of the uVision/ARM development tools. 6 | * This software may only be used under the terms of a valid, current, 7 | * end user licence from KEIL for a compatible version of KEIL software 8 | * development tools. Nothing else gives you the right to use this software. 9 | * 10 | * This software is supplied "AS IS" without warranties of any kind. 11 | * 12 | * Copyright (c) 2004-2011 Keil - An ARM Company. All rights reserved. 13 | *----------------------------------------------------------------------------*/ 14 | 15 | #ifndef __SERIAL_H 16 | #define __SERIAL_H 17 | 18 | //extern void SER_Init (void); 19 | //extern int SER_GetChar (void); 20 | //extern int SER_PutChar (int c); 21 | 22 | void SER_Init (void); 23 | int SER_GetChar (void); 24 | int SER_PutChar (int c); 25 | 26 | 27 | #endif /* __SERIAL_H */ 28 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sysinit.d: -------------------------------------------------------------------------------- 1 | .\flash\sysinit.o: ..\..\..\src\projects\project_bootloader\sysinit.c 2 | .\flash\sysinit.o: ..\..\..\src\common\common.h 3 | .\flash\sysinit.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\sysinit.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\sysinit.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\sysinit.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\sysinit.o: ..\..\..\src\common\assert.h 13 | .\flash\sysinit.o: ..\..\..\src\common\io.h 14 | .\flash\sysinit.o: ..\..\..\src\common\startup.h 15 | .\flash\sysinit.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\sysinit.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\sysinit.o: ..\..\..\src\projects\project_bootloader\sysinit.h 18 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ramfunc.d: -------------------------------------------------------------------------------- 1 | .\flash\flash_ramfunc.o: ..\..\..\src\drivers\FTFA\flash_ramFunc.c 2 | .\flash\flash_ramfunc.o: ..\..\..\src\common\common.h 3 | .\flash\flash_ramfunc.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\flash_ramfunc.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\flash_ramfunc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\flash_ramfunc.o: ..\..\..\src\common\assert.h 13 | .\flash\flash_ramfunc.o: ..\..\..\src\common\io.h 14 | .\flash\flash_ramfunc.o: ..\..\..\src\common\startup.h 15 | .\flash\flash_ramfunc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/sst25.d: -------------------------------------------------------------------------------- 1 | .\flash\sst25.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.c 2 | .\flash\sst25.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.h 3 | .\flash\sst25.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\sst25.o: ..\..\..\src\drivers\spi\spi.h 5 | .\flash\sst25.o: ..\..\..\src\common\common.h 6 | .\flash\sst25.o: ..\..\..\src\platforms\freedom.h 7 | .\flash\sst25.o: ..\..\..\src\drivers\mcg\mcg.h 8 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 9 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 10 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 11 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 12 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 13 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 14 | .\flash\sst25.o: ..\..\..\src\common\assert.h 15 | .\flash\sst25.o: ..\..\..\src\common\io.h 16 | .\flash\sst25.o: ..\..\..\src\common\startup.h 17 | .\flash\sst25.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 18 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 19 | -------------------------------------------------------------------------------- /firmware/source/src/cpu/nmi_isr_handler.c: -------------------------------------------------------------------------------- 1 | /* File: nmi_isr_handler.c 2 | * Purpose: Provides routines for handling nmi isr. 3 | * 4 | * Notes: 5 | * 6 | */ 7 | void nmi_isr(void); 8 | 9 | #include "common.h" 10 | #include "nmi_isr_handler.h" 11 | 12 | #ifdef CMSIS 13 | void NMI_Handler(void) 14 | #else 15 | void nmi_isr(void) 16 | #endif 17 | { 18 | int i; 19 | /* issue with rev 0 silicon - if in CPO and NMI taken, exit CPO */ 20 | if(MCM_CPO & MCM_CPO_CPOACK_MASK){ 21 | MCM_CPO &= ~MCM_CPO_CPOREQ_MASK; 22 | while (MCM_CPO & MCM_CPO_CPOACK_MASK); 23 | } else 24 | for(i= 0;i<0x1ffff;i++){ 25 | if ((FGPIOA_PDIR & 0x00000010) == 0x10) // if pin returns high stop 26 | break; // debounce 27 | } 28 | return; 29 | } 30 | 31 | void enable_NMI_button(void) 32 | { 33 | /* Configure the PTA4 pin for its NMI function */ 34 | 35 | PORTA_PCR4 = PORT_PCR_PS_MASK | 36 | PORT_PCR_PE_MASK | 37 | PORT_PCR_PFE_MASK | 38 | PORT_PCR_MUX(7); /* NMI Falling edge */ 39 | // NMI is alt7 function for this pin 40 | 41 | } 42 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ramfunc.d: -------------------------------------------------------------------------------- 1 | .\flash\flash_ramfunc.o: ..\..\..\src\drivers\FTFA\flash_ramFunc.c 2 | .\flash\flash_ramfunc.o: ..\..\..\src\common\common.h 3 | .\flash\flash_ramfunc.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\flash_ramfunc.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\flash_ramfunc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\flash_ramfunc.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\flash_ramfunc.o: ..\..\..\src\common\assert.h 13 | .\flash\flash_ramfunc.o: ..\..\..\src\common\io.h 14 | .\flash\flash_ramfunc.o: ..\..\..\src\common\startup.h 15 | .\flash\flash_ramfunc.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\flash_ramfunc.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/sst25.d: -------------------------------------------------------------------------------- 1 | .\flash\sst25.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.c 2 | .\flash\sst25.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.h 3 | .\flash\sst25.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\sst25.o: ..\..\..\src\drivers\spi\spi.h 5 | .\flash\sst25.o: ..\..\..\src\common\common.h 6 | .\flash\sst25.o: ..\..\..\src\platforms\freedom.h 7 | .\flash\sst25.o: ..\..\..\src\drivers\mcg\mcg.h 8 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 9 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 10 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 11 | .\flash\sst25.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 12 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 13 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 14 | .\flash\sst25.o: ..\..\..\src\common\assert.h 15 | .\flash\sst25.o: ..\..\..\src\common\io.h 16 | .\flash\sst25.o: ..\..\..\src\common\startup.h 17 | .\flash\sst25.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 18 | .\flash\sst25.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 19 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf.d: -------------------------------------------------------------------------------- 1 | .\flash\dtmf.o: ..\..\..\src\projects\project_main\DTMF.c 2 | .\flash\dtmf.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.H 3 | .\flash\dtmf.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 4 | .\flash\dtmf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\dtmf.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\dtmf.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\dtmf.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | .\flash\dtmf.o: ..\..\..\src\common\common.h 9 | .\flash\dtmf.o: ..\..\..\src\platforms\freedom.h 10 | .\flash\dtmf.o: ..\..\..\src\drivers\mcg\mcg.h 11 | .\flash\dtmf.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\dtmf.o: ..\..\..\src\common\assert.h 13 | .\flash\dtmf.o: ..\..\..\src\common\io.h 14 | .\flash\dtmf.o: ..\..\..\src\common\startup.h 15 | .\flash\dtmf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\dtmf.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\dtmf.o: ..\..\..\src\cpu\start.h 18 | .\flash\dtmf.o: ..\..\..\src\projects\project_main\DTMF.h 19 | .\flash\dtmf.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/nmi_isr_handler.d: -------------------------------------------------------------------------------- 1 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\nmi_isr_handler.c 2 | .\flash\nmi_isr_handler.o: ..\..\..\src\common\common.h 3 | .\flash\nmi_isr_handler.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\nmi_isr_handler.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\nmi_isr_handler.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\nmi_isr_handler.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\nmi_isr_handler.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\nmi_isr_handler.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\nmi_isr_handler.o: ..\..\..\src\common\assert.h 13 | .\flash\nmi_isr_handler.o: ..\..\..\src\common\io.h 14 | .\flash\nmi_isr_handler.o: ..\..\..\src\common\startup.h 15 | .\flash\nmi_isr_handler.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\nmi_isr_handler.o: ..\..\..\src\cpu\nmi_isr_handler.h 18 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/sys_rtc.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTC_H__ 2 | #define __RTC_H__ 3 | #include "stm32f10x.h" 4 | #include 5 | #include "exti.h" 6 | #include "system_config.h" 7 | #include "hw_config.h" 8 | 9 | #define WTD_MAIN_LOOP 0 10 | #define WTD_TIMER0_LOOP 1 11 | #define WTD_TIMER1_LOOP 2 12 | 13 | #define WAKEUP_TIME2 30 14 | #define WAKEUP_TIME1 120 15 | #define WAKEUP_TIME 300 16 | #define RTC_FREQUENCY 1000 //Hz 17 | #define ALARM_FREQUENCY 10 18 | 19 | #define MOVING_MODE 0 20 | #define STOP_MODE 1 21 | 22 | 23 | extern uint32_t rtcSecCnt; 24 | extern uint32_t rtcCnt; 25 | extern volatile uint32_t rtcTimeSec; 26 | extern volatile uint8_t rtcTimeSecFlagUpdate; 27 | extern uint32_t timeoutSleep; 28 | extern uint32_t timeoutSleepStatus; 29 | extern uint32_t timepowerOffDelay; 30 | extern uint32_t batteryWarningCnt; 31 | extern uint32_t powerWarningCnt; 32 | extern uint32_t securityOkFlag; 33 | extern uint32_t autoSecurityCnt; 34 | extern uint8_t flagAccountCheck; 35 | 36 | 37 | extern volatile uint32_t watchdogFeed[WATCHDOG_NUM]; 38 | extern uint32_t watchdogEnable[WATCHDOG_NUM]; 39 | 40 | 41 | void RTC_Init(void); 42 | uint32_t RTC_GetCounter(void); 43 | void RTC_SetAlarm(uint32_t AlarmValue); 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/gps_task.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __GPS_TASK_H__ 4 | #define __GPS_TASK_H__ 5 | 6 | 7 | #define GPS_WALKING_INTERVAL 300 8 | #define GPS_WAITING_TIME 180 9 | 10 | #define lastNmeaInfo lastGpsInfo 11 | 12 | 13 | typedef enum{ 14 | GPS_IDLE = 0, 15 | GPS_ENABLE_PHASE, 16 | GPS_GET_LOCATION_PHASE, 17 | GPS_FIXED_PHASE, 18 | GPS_STOP_PHASE 19 | }GPS_CTRL_PHASE; 20 | 21 | extern uint32_t gpsTimeSec; 22 | extern uint32_t gpsInterval; 23 | extern uint32_t GPS_timeoutCheck; 24 | extern uint32_t GPS_timeCnt; 25 | extern uint8_t movementToCheckGps; 26 | extern uint8_t timeGetGPS; 27 | extern uint32_t lastGpsGotTime; 28 | extern uint8_t serverWaitGpsFlag; 29 | extern uint32_t gpsSleepCntTime; 30 | extern uint8_t lastGpsFixed; 31 | extern uint8_t gpsPromptFlag; 32 | extern uint8_t saveGpsFlag; 33 | extern uint8_t sendGpsFlag; 34 | extern uint8_t gpsPedometerFlag; 35 | extern uint8_t intervalPedometerFlag; 36 | extern volatile float currentSpeed; 37 | extern uint32_t flagSaveLog; 38 | extern uint8_t flagSaveTime; 39 | 40 | 41 | void GpsTask_SetPhase(GPS_CTRL_PHASE phase); 42 | void GpsTask_Init(void); 43 | GPS_CTRL_PHASE GpsTask_GetPhase(void); 44 | void GpsTask_EnableGps(void); 45 | void GpsTask_Control(void); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /firmware/source/src/common/memtest.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | * 3 | * Filename: memtest.h 4 | * 5 | * Description: Memory-testing module API. 6 | * 7 | * Notes: The memory tests can be easily ported to systems with 8 | * different data bus widths by redefining 'datum' type. 9 | * 10 | * 11 | * Copyright (c) 2000 by Michael Barr. This software is placed into 12 | * the public domain and may be used for any purpose. However, this 13 | * notice must not be changed or removed and no warranty is either 14 | * expressed or implied by its publication or distribution. 15 | **********************************************************************/ 16 | 17 | #ifndef _memtest_h 18 | #define _memtest_h 19 | 20 | 21 | /* 22 | * Define NULL pointer value. 23 | */ 24 | #ifndef NULL 25 | #define NULL (void *) 0 26 | #endif 27 | 28 | /* 29 | * Set the data bus width. 30 | */ 31 | typedef unsigned long datum; 32 | 33 | /* 34 | * Function prototypes. 35 | */ 36 | datum memTestDataBus(volatile datum * address); 37 | datum * memTestAddressBus(volatile datum * baseAddress, unsigned long nBytes); 38 | datum * memTestDevice(volatile datum * baseAddress, unsigned long nBytes); 39 | 40 | 41 | #endif /* _memtest_h */ 42 | 43 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_ftfa.d: -------------------------------------------------------------------------------- 1 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\FTFA\flash_FTFA.c 2 | .\flash\flash_ftfa.o: ..\..\..\src\common\common.h 3 | .\flash\flash_ftfa.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\flash_ftfa.o: ..\..\..\src\common\assert.h 13 | .\flash\flash_ftfa.o: ..\..\..\src\common\io.h 14 | .\flash\flash_ftfa.o: ..\..\..\src\common\startup.h 15 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\FTFA\flash_FTFA.h 18 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 19 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/xl362_io.d: -------------------------------------------------------------------------------- 1 | .\flash\xl362_io.o: ..\..\..\src\Libraries\common_lib\acclerometer\xl362_io.c 2 | .\flash\xl362_io.o: ..\..\..\src\Libraries\common_lib\acclerometer\xl362_io.h 3 | .\flash\xl362_io.o: ..\..\..\src\Libraries\common_lib\acclerometer\XL362.h 4 | .\flash\xl362_io.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\xl362_io.o: ..\..\..\src\drivers\spi\spi.h 6 | .\flash\xl362_io.o: ..\..\..\src\common\common.h 7 | .\flash\xl362_io.o: ..\..\..\src\platforms\freedom.h 8 | .\flash\xl362_io.o: ..\..\..\src\drivers\mcg\mcg.h 9 | .\flash\xl362_io.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 10 | .\flash\xl362_io.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 11 | .\flash\xl362_io.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 12 | .\flash\xl362_io.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 13 | .\flash\xl362_io.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 14 | .\flash\xl362_io.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 15 | .\flash\xl362_io.o: ..\..\..\src\common\assert.h 16 | .\flash\xl362_io.o: ..\..\..\src\common\io.h 17 | .\flash\xl362_io.o: ..\..\..\src\common\startup.h 18 | .\flash\xl362_io.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 19 | .\flash\xl362_io.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flash_ftfa.d: -------------------------------------------------------------------------------- 1 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\FTFA\flash_FTFA.c 2 | .\flash\flash_ftfa.o: ..\..\..\src\common\common.h 3 | .\flash\flash_ftfa.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\flash_ftfa.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\flash_ftfa.o: ..\..\..\src\common\assert.h 13 | .\flash\flash_ftfa.o: ..\..\..\src\common\io.h 14 | .\flash\flash_ftfa.o: ..\..\..\src\common\startup.h 15 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\flash_ftfa.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\flash_ftfa.o: ..\..\..\src\drivers\FTFA\flash_FTFA.h 18 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 19 | .\flash\flash_ftfa.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 20 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/flashprog.d: -------------------------------------------------------------------------------- 1 | .\flash\flashprog.o: ..\..\..\src\projects\project_bootloader\FlashProg.c 2 | .\flash\flashprog.o: ..\..\..\src\common\common.h 3 | .\flash\flashprog.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\flashprog.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\flashprog.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\flashprog.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\flashprog.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\flashprog.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\flashprog.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\flashprog.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\flashprog.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\flashprog.o: ..\..\..\src\common\assert.h 13 | .\flash\flashprog.o: ..\..\..\src\common\io.h 14 | .\flash\flashprog.o: ..\..\..\src\common\startup.h 15 | .\flash\flashprog.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\flashprog.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\flashprog.o: ..\..\..\src\drivers\flash\fmc.h 18 | .\flash\flashprog.o: ..\..\..\src\projects\project_bootloader\flashprog.h 19 | .\flash\flashprog.o: ..\..\..\src\drivers\FTFA\flash_FTFA.h 20 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/tracker.h: -------------------------------------------------------------------------------- 1 | #ifndef __TRACKER_H__ 2 | #define __TRACKER_H__ 3 | 4 | #include 5 | #include "ringbuf.h" 6 | #include "db.h" 7 | 8 | 9 | #define M_PI 3.14159265358979323846 /* pi */ 10 | #define d2r (M_PI / 180.0) 11 | 12 | 13 | extern uint32_t rpSampleCount; 14 | 15 | typedef struct __attribute__((packed)){ 16 | uint8_t oldMsgIsEmpty; 17 | uint8_t newMsgIsEmpty; 18 | uint8_t lastMsgIsEmpty; 19 | MSG_STATUS_RECORD oldMsg; 20 | MSG_STATUS_RECORD newMsg; 21 | MSG_STATUS_RECORD lastMsg; 22 | } TRACKER_MSG_TYPE; 23 | 24 | 25 | 26 | extern TRACKER_MSG_TYPE trackerMsg; 27 | extern MSG_STATUS_RECORD logRecord,logRecordTemp; 28 | extern uint32_t serverSendDataFlag; 29 | extern RINGBUF trackerRbOldMsg; 30 | extern RINGBUF trackerRbNewMsg; 31 | extern uint8_t trackerEnable; 32 | 33 | extern uint8_t hasMoved; 34 | 35 | void TrackerInit(void); 36 | void TrackerTask_EnableGps(void); 37 | void TrackerTask(void); 38 | uint16_t CalculateCRC(const int8_t* buf, int16_t len); 39 | //float haversine_km(float lat1, float long1, float lat2, float long2); 40 | uint32_t GetTrackerMsg(char *buff,uint32_t *len); 41 | uint32_t GetLastTrackerMsg(char *buff,uint32_t *len); 42 | uint32_t CheckTrackerMsgIsReady(void); 43 | uint32_t CheckTrackerMsgFill(void); 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/gprs_cmd_ctrl.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPRS_CMD_CTRL_H__ 2 | #define __GPRS_CMD_CTRL_H__ 3 | #include 4 | 5 | uint16_t DPWO_Add(char *data,uint32_t len); 6 | uint16_t DGPS_Add(MSG_STATUS_RECORD *logRecordSend,char *data,uint32_t *len); 7 | uint16_t DCLI_Add(MSG_STATUS_RECORD *logRecordSend,char *data,uint32_t *len); 8 | uint32_t DSOS_Add(char *data, uint8_t sosAction, uint8_t sosSession); 9 | uint16_t DSRT_Add(char *data,uint32_t len); 10 | uint16_t DPWF_Add(char *data,uint32_t len); 11 | uint16_t CFG_Add(uint8_t *header,uint8_t *buf,uint8_t *data,uint16_t dataLen,uint16_t cfgSize,uint16_t cfgOffset); 12 | uint16_t CFG_Parser(uint8_t *header,uint8_t *buf,uint8_t *data,uint16_t *dataLen,uint16_t *cfgSize,uint16_t *cfgOffset); 13 | uint16_t DCFG_Add(uint8_t session, uint8_t *buf, uint8_t *cfgData, uint16_t dataLen, uint16_t cfgSize, uint16_t cfgOffset); 14 | uint8_t DCFG_Parser(uint8_t *buf, uint8_t *session, uint16_t *cfgSize, uint16_t *cfgOffset); 15 | uint16_t SCFG_Add(uint8_t session, uint8_t *buf, uint16_t cfgSize, uint16_t cfgOffset); 16 | uint8_t SCFG_Parser(uint8_t *buf, uint8_t *data, uint8_t *session, uint16_t *dataLen, uint16_t *cfgSize, uint16_t *cfgOffset, uint16_t receivedLen); 17 | uint8_t IsGprsDataPacket(uint8_t *buf, char *header, uint8_t headerLen); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/uip/uip_ppp.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "uip_ppp.h" 4 | #include "uip.h" 5 | #include "tick.h" 6 | 7 | struct timer uipTimer; 8 | 9 | void UIP_SetHostAddr() 10 | { 11 | uip_ipaddr_t localIp; 12 | 13 | timer_set(&uipTimer, TICK_SECOND / 2); 14 | 15 | uip_ipaddr(&localIp, pppIpAddr[0], pppIpAddr[1], pppIpAddr[2], pppIpAddr[3]); 16 | 17 | uip_sethostaddr(&localIp); 18 | } 19 | void UIP_Input() 20 | { 21 | uip_len = pppFrameSize; 22 | uip_input(); 23 | if(uip_len){ 24 | uip_buf[0] = 0xFF; 25 | uip_buf[1] = 0x03; 26 | uip_buf[2] = 0x00; 27 | uip_buf[3] = 0x21; 28 | PPP_Send(uip_buf, uip_len+6); 29 | } 30 | } 31 | void UIP_Periodic() 32 | { 33 | U8 i; 34 | if(timer_expired(&uipTimer)){ 35 | timer_restart(&uipTimer); 36 | 37 | for(i=0; i.h 6 | */ 7 | 8 | #include "common.h" 9 | #include "uart.h" 10 | 11 | /********************************************************************/ 12 | char 13 | in_char (void) 14 | { 15 | if (TERM_PORT_NUM == 0) 16 | return uart0_getchar(UART0_BASE_PTR); 17 | else if (TERM_PORT_NUM == 1) 18 | return uart_getchar(UART1_BASE_PTR); 19 | else 20 | return uart_getchar(UART2_BASE_PTR); 21 | 22 | } 23 | /********************************************************************/ 24 | void 25 | out_char (char ch) 26 | { 27 | if (TERM_PORT_NUM == 0) 28 | uart0_putchar(UART0_BASE_PTR, ch); 29 | else if (TERM_PORT_NUM == 1) 30 | uart_putchar(UART1_BASE_PTR, ch); 31 | else 32 | uart_putchar(UART2_BASE_PTR, ch); 33 | 34 | } 35 | 36 | /********************************************************************/ 37 | int 38 | char_present (void) 39 | { 40 | if (TERM_PORT_NUM == 0) 41 | return uart0_getchar_present(UART0_BASE_PTR); 42 | else if (TERM_PORT_NUM == 1) 43 | return uart_getchar_present(UART1_BASE_PTR); 44 | else 45 | return uart_getchar_present(UART2_BASE_PTR); 46 | 47 | } 48 | /********************************************************************/ 49 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/pit/pit.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Freescale Semiconductor Inc. 4 | * (c) Copyright 2004-2005 Freescale Semiconductor, Inc. 5 | * (c) Copyright 2001-2004 Motorola, Inc. 6 | * ALL RIGHTS RESERVED. 7 | * 8 | ***************************************************************************//*! 9 | * 10 | * @file main.c 11 | * 12 | * @author b01252 13 | * 14 | * @version 1.0 15 | * 16 | * @date Mar-10-2004 17 | * 18 | * @brief Brief description of the file 19 | * 20 | ******************************************************************************* 21 | * 22 | * Provides initialization and interrupt service for PIT 23 | * 24 | ******************************************************************************/ 25 | 26 | #include "common.h" 27 | #include "global.h" 28 | 29 | /** PIT_init 30 | * \brief Initialize Periodic interrupt timer, 31 | * \brief PIT1 is used for tone/buzzer time control 32 | * \author b01252 33 | * \param none 34 | * \return none 35 | */ 36 | void Pit_init(void); 37 | 38 | /** PIT_init 39 | * \brief Periodic interrupt Timer 1. Interrupt service 40 | * \brief PIT1 is used for tone/buzzer time control 41 | * \author b01252 42 | * \param none 43 | * \return none 44 | */ 45 | void pit1_isrv(void); 46 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/dtmf_app.d: -------------------------------------------------------------------------------- 1 | .\flash\dtmf_app.o: ..\..\..\src\projects\project_main\DTMF_app.c 2 | .\flash\dtmf_app.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.H 3 | .\flash\dtmf_app.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 4 | .\flash\dtmf_app.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\dtmf_app.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 6 | .\flash\dtmf_app.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 7 | .\flash\dtmf_app.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 8 | .\flash\dtmf_app.o: ..\..\..\src\common\common.h 9 | .\flash\dtmf_app.o: ..\..\..\src\platforms\freedom.h 10 | .\flash\dtmf_app.o: ..\..\..\src\drivers\mcg\mcg.h 11 | .\flash\dtmf_app.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\dtmf_app.o: ..\..\..\src\common\assert.h 13 | .\flash\dtmf_app.o: ..\..\..\src\common\io.h 14 | .\flash\dtmf_app.o: ..\..\..\src\common\startup.h 15 | .\flash\dtmf_app.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\dtmf_app.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\dtmf_app.o: ..\..\..\src\cpu\start.h 18 | .\flash\dtmf_app.o: ..\..\..\src\projects\project_main\DTMF.h 19 | .\flash\dtmf_app.o: C:\Keil\ARM\ARMCC\bin\..\include\stdio.h 20 | .\flash\dtmf_app.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 21 | .\flash\dtmf_app.o: ..\..\..\src\cpu\sysinit.h 22 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/uart/uart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: uart.h 3 | * Purpose: Provide common ColdFire uart routines for polled serial IO 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef __uart_H__ 9 | #define __uart_H__ 10 | #include "common.h" 11 | #include "MemMapPtr_KL25Z4.h" 12 | #include 13 | #include "ringbuf.h" 14 | #include "gps.h" 15 | 16 | #define USE_UART0_RINGBUFF 17 | #define USE_UART1_RINGBUFF 18 | 19 | #ifdef USE_UART0_RINGBUFF 20 | extern RINGBUF USART0_RxRingBuff; 21 | #endif 22 | 23 | #ifdef USE_UART1_RINGBUFF 24 | extern RINGBUF USART1_RxRingBuff; 25 | #endif 26 | 27 | /********************************************************************/ 28 | 29 | 30 | void uart_init (UART_MemMapPtr uartch, uint32 sysclk, uint32 baud); 31 | char uart_getchar (UART_MemMapPtr channel); 32 | void uart_putchar (UART_MemMapPtr channel, char ch); 33 | void uart_putstr(UART_MemMapPtr channel, uint8 *s); 34 | int uart_getchar_present (UART_MemMapPtr channel); 35 | void uart0_init (UART0_MemMapPtr uartch, uint32 sysclk, uint32 baud); 36 | char uart0_getchar (UART0_MemMapPtr channel); 37 | void uart0_putchar (UART0_MemMapPtr channel, char ch); 38 | void uart0_putstr(UART0_MemMapPtr channel, uint8 *s); 39 | int uart0_getchar_present (UART0_MemMapPtr channel); 40 | 41 | /********************************************************************/ 42 | 43 | #endif /* __uart_H__ */ 44 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/ppp/ppp.h: -------------------------------------------------------------------------------- 1 | #ifndef _PPP_H_ 2 | #define _PPP_H_ 3 | 4 | #include 5 | #include 6 | #include "typedef.h" 7 | #include "modem.h" 8 | #include "fcs.h" 9 | #include "ringbuf.h" 10 | #include "uart1.h" 11 | 12 | 13 | #define PPP_BUFFER_SIZE 88 14 | // PPP Packet type 15 | #define LCP_PACKET 0x21C0 16 | #define PAP_PACKET 0x23C0 17 | #define CHAP_PACKET 0x23C2 18 | #define IPCP_PACKET 0x2180 19 | #define IP_DATAGRAM 0x2100 20 | 21 | // LCP Packet type 22 | #define CONFIG_REQ 0x01 23 | #define CONFIG_ACK 0x02 24 | #define CONFIG_NACK 0x03 25 | #define CONFIG_REJ 0x04 26 | #define TERM_REQ 0x05 27 | #define TERM_ACK 0x06 28 | #define CODE_REJ 0x07 29 | #define PROTO_REJ 0x08 30 | #define ECHO_REQ 0x09 31 | #define ECHO_REPLY 0x0A 32 | #define DISC_REQ 0x0B 33 | 34 | 35 | #define PPP_AUTH_PAP 0x00 36 | #define PPP_AUTH_CHAP 0x01 37 | 38 | #define PPP_Info(...) // PrintfDebug(__VA_ARGS__) 39 | #define PPP_Debug(...) // PrintfDebug(__VA_ARGS__) 40 | 41 | #define PPP_MAX_RESTART 5 42 | 43 | extern U8 pppIpAddr[4]; 44 | extern U16 pppFrameSize; 45 | 46 | void PPP_Init(void); 47 | void PPP_SetAuthentication(U8 mode, I8* usr, I8* pwd); 48 | void PPP_ManageLink(void); 49 | void PPP_ReInit(void); 50 | I8 PPP_IsLinked(void); 51 | void PPP_Send(U8* packet, U16 len); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/bsp/bsp_KL25.c: -------------------------------------------------------------------------------- 1 | #include "bsp_KL25.h" 2 | 3 | void vfnfll_init (void); 4 | void fll_init (void); 5 | 6 | void vfnInitUSBClock (uint8 u8ClkOption) 7 | { 8 | 9 | switch (u8ClkOption) 10 | { 11 | case MCGPLL0: 12 | { 13 | SIM_SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK /** PLL reference */ 14 | | SIM_SOPT2_USBSRC_MASK; /** USB fractional divider like USB reference clock */ 15 | /** There are no clock dividers for the L2K PLL */ 16 | break; 17 | } 18 | 19 | 20 | case MCGFLL: 21 | { 22 | /** Configure FLL to generate a 48MHz core clock */ 23 | fll_init(); 24 | 25 | SIM_SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK; /** FLL reference */ 26 | SIM_SOPT2 |= SIM_SOPT2_USBSRC_MASK; /** USB fractional divider like USB reference clock */ 27 | break; 28 | } 29 | 30 | case CLKIN: 31 | { 32 | SIM_SOPT2 &= (uint32)(~SIM_SOPT2_USBSRC_MASK); /** PTA5 selected as USBFS CLK source */ 33 | FLAG_SET(SIM_SCGC5_PORTA_SHIFT,SIM_SCGC5); 34 | PORTA_PCR5=(0|PORT_PCR_MUX(2)); // Enabling PTA5 as CLK input 35 | } 36 | } 37 | 38 | SIM_SCGC4|=(SIM_SCGC4_USBOTG_MASK); // USB Clock Gating 39 | } 40 | 41 | 42 | 43 | void fll_init(void) 44 | { 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/uip/resolver.c: -------------------------------------------------------------------------------- 1 | #include "resolver.h" 2 | #include "tick.h" 3 | #include "config_pool.h" 4 | 5 | #define RESOLVER_INTERVAL (TICK_SECOND * 60 * 60 * 48) 6 | 7 | U64 resolverTick; 8 | enum{ 9 | INITIAL, 10 | QUERY, 11 | STANDBY, 12 | }resolverState; 13 | 14 | void RESOLVER_Reset() 15 | { 16 | resolverState = INITIAL; 17 | resolverTick = (U64)TICK_Get(); 18 | } 19 | 20 | void RESOLVER_Manage() 21 | { 22 | uip_ipaddr_t dnsServerIp; 23 | switch(resolverState){ 24 | case INITIAL: 25 | resolv_init(); 26 | uip_ipaddr(&dnsServerIp, 208, 67, 222, 222); 27 | resolv_conf(&dnsServerIp); 28 | 29 | case QUERY: 30 | resolv_query((const char *)sysCfg.fserverName); 31 | resolv_query((const char *)sysCfg.dserverName); 32 | resolverTick = TICK_Get64(); 33 | resolverState = STANDBY; 34 | 35 | case STANDBY: 36 | if(TICK_Get64() - resolverTick > RESOLVER_INTERVAL) 37 | resolverState = QUERY; 38 | break; 39 | 40 | default: 41 | break; 42 | } 43 | } 44 | uip_ipaddr_t *RESOLVER_Lookup(const I8 *name) 45 | { 46 | return (uip_ipaddr_t*)resolv_lookup(name); 47 | } 48 | void RESOLVER_Query(const I8 *name) 49 | { 50 | resolv_query(name); 51 | } 52 | void resolv_found(I8 *name, uip_ipaddr_t *ipaddr) 53 | { 54 | if(ipaddr != NULL){ 55 | MODEM_Info("RESOLV: name: %s, address: %d.%d.%d.%d\n", name, ipaddr->u8[0], ipaddr->u8[1], ipaddr->u8[2], ipaddr->u8[3]); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/flash_mem.d: -------------------------------------------------------------------------------- 1 | .\flash\flash_mem.o: ..\..\..\src\FATFS\ff9b\src\flash_mem.c 2 | .\flash\flash_mem.o: ..\..\..\src\drivers\spi\spi.h 3 | .\flash\flash_mem.o: ..\..\..\src\common\common.h 4 | .\flash\flash_mem.o: ..\..\..\src\platforms\freedom.h 5 | .\flash\flash_mem.o: ..\..\..\src\drivers\mcg\mcg.h 6 | .\flash\flash_mem.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 7 | .\flash\flash_mem.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 8 | .\flash\flash_mem.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 9 | .\flash\flash_mem.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 10 | .\flash\flash_mem.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 11 | .\flash\flash_mem.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 12 | .\flash\flash_mem.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 13 | .\flash\flash_mem.o: ..\..\..\src\common\assert.h 14 | .\flash\flash_mem.o: ..\..\..\src\common\io.h 15 | .\flash\flash_mem.o: ..\..\..\src\common\startup.h 16 | .\flash\flash_mem.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 17 | .\flash\flash_mem.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 18 | .\flash\flash_mem.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.h 19 | .\flash\flash_mem.o: ..\..\..\src\drivers\usb\mscuser.h 20 | .\flash\flash_mem.o: ..\..\..\src\FATFS\ff9b\src\flash_mem.h 21 | .\flash\flash_mem.o: ..\..\..\src\FATFS\ff9b\src\diskio.h 22 | .\flash\flash_mem.o: ..\..\..\src\FATFS\ff9b\src\integer.h 23 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/hiduser.d: -------------------------------------------------------------------------------- 1 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hiduser.c 2 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\hiduser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usbhw.h 5 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hid.h 6 | .\flash\hiduser.o: ..\..\..\src\projects\project_main\usbcfg.h 7 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usbcore.h 8 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hiduser.h 9 | .\flash\hiduser.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 10 | .\flash\hiduser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 11 | .\flash\hiduser.o: ..\..\..\src\common\common.h 12 | .\flash\hiduser.o: ..\..\..\src\platforms\freedom.h 13 | .\flash\hiduser.o: ..\..\..\src\drivers\mcg\mcg.h 14 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 15 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 16 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 17 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 18 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 19 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 20 | .\flash\hiduser.o: ..\..\..\src\common\assert.h 21 | .\flash\hiduser.o: ..\..\..\src\common\io.h 22 | .\flash\hiduser.o: ..\..\..\src\common\startup.h 23 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 24 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/hiduser.d: -------------------------------------------------------------------------------- 1 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hiduser.c 2 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\hiduser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usbhw.h 5 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hid.h 6 | .\flash\hiduser.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 7 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\usbcore.h 8 | .\flash\hiduser.o: ..\..\..\src\drivers\usb\hiduser.h 9 | .\flash\hiduser.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 10 | .\flash\hiduser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 11 | .\flash\hiduser.o: ..\..\..\src\common\common.h 12 | .\flash\hiduser.o: ..\..\..\src\platforms\freedom.h 13 | .\flash\hiduser.o: ..\..\..\src\drivers\mcg\mcg.h 14 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 15 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 16 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 17 | .\flash\hiduser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 18 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 19 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 20 | .\flash\hiduser.o: ..\..\..\src\common\assert.h 21 | .\flash\hiduser.o: ..\..\..\src\common\io.h 22 | .\flash\hiduser.o: ..\..\..\src\common\startup.h 23 | .\flash\hiduser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 24 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/cdcuser.d: -------------------------------------------------------------------------------- 1 | .\flash\cdcuser.o: ..\..\..\src\projects\project_bootloader\cdcuser.c 2 | .\flash\cdcuser.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\cdcuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\cdcuser.o: ..\..\..\src\drivers\usb\usbhw.h 5 | .\flash\cdcuser.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 6 | .\flash\cdcuser.o: ..\..\..\src\drivers\usb\usbcore.h 7 | .\flash\cdcuser.o: ..\..\..\src\projects\project_bootloader\cdc.h 8 | .\flash\cdcuser.o: ..\..\..\src\projects\project_bootloader\cdcuser.h 9 | .\flash\cdcuser.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 10 | .\flash\cdcuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 11 | .\flash\cdcuser.o: ..\..\..\src\common\common.h 12 | .\flash\cdcuser.o: ..\..\..\src\platforms\freedom.h 13 | .\flash\cdcuser.o: ..\..\..\src\drivers\mcg\mcg.h 14 | .\flash\cdcuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 15 | .\flash\cdcuser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 16 | .\flash\cdcuser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 17 | .\flash\cdcuser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 18 | .\flash\cdcuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 19 | .\flash\cdcuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 20 | .\flash\cdcuser.o: ..\..\..\src\common\assert.h 21 | .\flash\cdcuser.o: ..\..\..\src\common\io.h 22 | .\flash\cdcuser.o: ..\..\..\src\common\startup.h 23 | .\flash\cdcuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 24 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbuser.d: -------------------------------------------------------------------------------- 1 | .\flash\usbuser.o: ..\..\..\src\projects\project_main\usbuser.c 2 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\usbuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbuser.o: ..\..\..\src\projects\project_main\usbcfg.h 5 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usbhw.h 6 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usbcore.h 7 | .\flash\usbuser.o: ..\..\..\src\projects\project_main\usbuser.h 8 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\mscuser.h 9 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\cdcuser.h 10 | .\flash\usbuser.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 11 | .\flash\usbuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 12 | .\flash\usbuser.o: ..\..\..\src\common\common.h 13 | .\flash\usbuser.o: ..\..\..\src\platforms\freedom.h 14 | .\flash\usbuser.o: ..\..\..\src\drivers\mcg\mcg.h 15 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 16 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 17 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 18 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 19 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 20 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 21 | .\flash\usbuser.o: ..\..\..\src\common\assert.h 22 | .\flash\usbuser.o: ..\..\..\src\common\io.h 23 | .\flash\usbuser.o: ..\..\..\src\common\startup.h 24 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 25 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/system_config.d: -------------------------------------------------------------------------------- 1 | .\flash\system_config.o: ..\..\..\src\projects\project_main\system_config.c 2 | .\flash\system_config.o: ..\..\..\src\common\common.h 3 | .\flash\system_config.o: ..\..\..\src\platforms\freedom.h 4 | .\flash\system_config.o: ..\..\..\src\drivers\mcg\mcg.h 5 | .\flash\system_config.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 6 | .\flash\system_config.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 7 | .\flash\system_config.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 8 | .\flash\system_config.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 9 | .\flash\system_config.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 10 | .\flash\system_config.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 11 | .\flash\system_config.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 12 | .\flash\system_config.o: ..\..\..\src\common\assert.h 13 | .\flash\system_config.o: ..\..\..\src\common\io.h 14 | .\flash\system_config.o: ..\..\..\src\common\startup.h 15 | .\flash\system_config.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 16 | .\flash\system_config.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 17 | .\flash\system_config.o: ..\..\..\src\projects\project_main\system_config.h 18 | .\flash\system_config.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 19 | .\flash\system_config.o: ..\..\..\src\drivers\tick\tick.h 20 | .\flash\system_config.o: ..\..\..\src\drivers\flash\fmc.h 21 | .\flash\system_config.o: ..\..\..\src\drivers\FTFA\flash_FTFA.h 22 | .\flash\system_config.o: ..\..\..\src\projects\project_main\sos_tasks.h 23 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbuser.d: -------------------------------------------------------------------------------- 1 | .\flash\usbuser.o: ..\..\..\src\projects\project_bootloader\usbuser.c 2 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usb.h 3 | .\flash\usbuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbuser.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 5 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usbhw.h 6 | .\flash\usbuser.o: ..\..\..\src\drivers\usb\usbcore.h 7 | .\flash\usbuser.o: ..\..\..\src\projects\project_bootloader\usbuser.h 8 | .\flash\usbuser.o: ..\..\..\src\projects\project_bootloader\mscuser.h 9 | .\flash\usbuser.o: ..\..\..\src\projects\project_bootloader\cdcuser.h 10 | .\flash\usbuser.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 11 | .\flash\usbuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 12 | .\flash\usbuser.o: ..\..\..\src\common\common.h 13 | .\flash\usbuser.o: ..\..\..\src\platforms\freedom.h 14 | .\flash\usbuser.o: ..\..\..\src\drivers\mcg\mcg.h 15 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 16 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 17 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 18 | .\flash\usbuser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 19 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 20 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 21 | .\flash\usbuser.o: ..\..\..\src\common\assert.h 22 | .\flash\usbuser.o: ..\..\..\src\common\io.h 23 | .\flash\usbuser.o: ..\..\..\src\common\startup.h 24 | .\flash\usbuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 25 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/usbcore.d: -------------------------------------------------------------------------------- 1 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbcore.c 2 | .\flash\usbcore.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 3 | .\flash\usbcore.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usb.h 5 | .\flash\usbcore.o: ..\..\..\src\projects\project_main\usbcfg.h 6 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbhw.h 7 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbcore.h 8 | .\flash\usbcore.o: ..\..\..\src\projects\project_main\usbdesc.h 9 | .\flash\usbcore.o: ..\..\..\src\projects\project_main\usbuser.h 10 | .\flash\usbcore.o: ..\..\..\src\common\common.h 11 | .\flash\usbcore.o: ..\..\..\src\platforms\freedom.h 12 | .\flash\usbcore.o: ..\..\..\src\drivers\mcg\mcg.h 13 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 14 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 15 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 16 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 17 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 18 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 19 | .\flash\usbcore.o: ..\..\..\src\common\assert.h 20 | .\flash\usbcore.o: ..\..\..\src\common\io.h 21 | .\flash\usbcore.o: ..\..\..\src\common\startup.h 22 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 23 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\hid.h 24 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\hiduser.h 25 | .\flash\usbcore.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 26 | -------------------------------------------------------------------------------- /firmware/source/src/FATFS/ff9b/src/flash_mem.c: -------------------------------------------------------------------------------- 1 | #include "spi.h" 2 | #include "sst25.h" 3 | #include "mscuser.h" 4 | #include "flash_mem.h" 5 | #include "diskio.h" 6 | 7 | DSTATUS MMC_disk_initialize(void) 8 | { 9 | return 0; 10 | } 11 | 12 | DSTATUS SST25_disk_status(void) 13 | { 14 | return 0; 15 | } 16 | 17 | DRESULT SST25_disk_read(BYTE *buff, DWORD sector, BYTE count) 18 | { 19 | return SST25_Read(sector*512 + MSC_FLASH_START,buff,512); 20 | } 21 | 22 | DRESULT SST25_disk_write(BYTE *buff, DWORD sector, BYTE count) 23 | { 24 | return SST25_Write(sector*512 + MSC_FLASH_START,buff,512); 25 | } 26 | 27 | uint32_t get_fattime(void) 28 | { 29 | DWORD v = 0; 30 | 31 | v = 2013 - 1980; 32 | v <<= 25; 33 | 34 | v |= (DWORD)1 << 21; 35 | v |= (DWORD)1 << 16; 36 | v |= (DWORD)0 << 11; 37 | v |= (WORD)0 << 5; 38 | v |= 0 >> 1; 39 | 40 | return v; 41 | } 42 | 43 | DRESULT SST25_disk_ioctl(BYTE ctrl, void* buff) 44 | { 45 | DRESULT res; 46 | DWORD csize; 47 | 48 | res = RES_ERROR; 49 | switch (ctrl) { 50 | case CTRL_SYNC: 51 | res = RES_OK; 52 | break; 53 | 54 | case GET_SECTOR_COUNT: // get number of sectors on disk 55 | csize = MSC_MEMORY_SIZE / 512; 56 | *(DWORD*)buff = (DWORD)csize; 57 | res = RES_OK; 58 | break; 59 | 60 | case GET_SECTOR_SIZE : // get size of sectors on disk 61 | *(WORD*) buff = 512; 62 | res = RES_OK; 63 | break; 64 | 65 | case GET_BLOCK_SIZE : // get erase block size in units of sectors 66 | res = RES_OK; 67 | break; 68 | default: 69 | res = RES_PARERR; 70 | } 71 | return res; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/llwu/llwu.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * \file llwu_common.h 3 | * \brief common LLWU defines 4 | * 5 | * This file defines the functions/interrupt handlers/macros used for LLWU. 6 | * And some common function prototypes and initializations. 7 | * 8 | * \version $Revision: 1.1 $ 9 | * \author Philip Drake[rxaa60] 10 | */ 11 | 12 | #ifndef __LLWU_COMMON_H__ 13 | #define __LLWU_COMMON_H__ 14 | 15 | /* 16 | * Misc. Defines 17 | */ 18 | #define LLWU_LPTMR_ME 0x01 19 | #define LLWU_CMP0_ME 0x02 20 | #define LLWU_CMP1_ME 0x04 21 | #define LLWU_CMP2_ME 0x08 22 | #define LLWU_TSI_ME 0x10 23 | #define LLWU_RTCA_ME 0x20 24 | #define LLWU_RESRV_ME 0x40 25 | #define LLWU_RTCS_ME 0x80 26 | 27 | #define LLWU_PIN_DIS 0 28 | #define LLWU_PIN_RISING 1 29 | #define LLWU_PIN_FALLING 2 30 | #define LLWU_PIN_ANY 3 31 | 32 | #define LLWU_WUF5 0x00000001 33 | #define LLWU_WUF6 0x00000002 34 | #define LLWU_WUF7 0x00000004 35 | #define LLWU_WUF8 0x00000008 36 | #define LLWU_WUF9 0x00000010 37 | #define LLWU_WUF10 0x00000020 38 | #define LLWU_WUF11 0x00000040 39 | #define LLWU_WUF12 0x00000080 40 | #define LLWU_WUF13 0x00000100 41 | #define LLWU_WUF14 0x00000200 42 | #define LLWU_WUF15 0x00000400 43 | #define LLWU_MWUF0 0x00000800 44 | 45 | extern uint32_t llwuSource; 46 | /* 47 | * Function prototypes 48 | */ 49 | 50 | void llwu_configure(unsigned int pin_en, unsigned char rise_fall, unsigned char module_en); 51 | void llwu_isr(void); 52 | void llwu_configure_filter(unsigned int wu_pin_num, unsigned char filter_en, unsigned char rise_fall ); 53 | 54 | #endif /* __LLWU_COMMON_H__ */ 55 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/mscuser.d: -------------------------------------------------------------------------------- 1 | .\flash\mscuser.o: ..\..\..\src\projects\project_bootloader\mscuser.c 2 | .\flash\mscuser.o: C:\Keil\ARM\ARMCC\bin\..\include\string.h 3 | .\flash\mscuser.o: ..\..\..\src\drivers\usb\usb.h 4 | .\flash\mscuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 5 | .\flash\mscuser.o: ..\..\..\src\projects\project_bootloader\msc.h 6 | .\flash\mscuser.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 7 | .\flash\mscuser.o: ..\..\..\src\drivers\usb\usbhw.h 8 | .\flash\mscuser.o: ..\..\..\src\drivers\usb\usbcore.h 9 | .\flash\mscuser.o: ..\..\..\src\projects\project_bootloader\mscuser.h 10 | .\flash\mscuser.o: ..\..\..\src\common\common.h 11 | .\flash\mscuser.o: ..\..\..\src\platforms\freedom.h 12 | .\flash\mscuser.o: ..\..\..\src\drivers\mcg\mcg.h 13 | .\flash\mscuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 14 | .\flash\mscuser.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 15 | .\flash\mscuser.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 16 | .\flash\mscuser.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 17 | .\flash\mscuser.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 18 | .\flash\mscuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 19 | .\flash\mscuser.o: ..\..\..\src\common\assert.h 20 | .\flash\mscuser.o: ..\..\..\src\common\io.h 21 | .\flash\mscuser.o: ..\..\..\src\common\startup.h 22 | .\flash\mscuser.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 23 | .\flash\mscuser.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 24 | .\flash\mscuser.o: ..\..\..\src\drivers\spi\spi.h 25 | .\flash\mscuser.o: ..\..\..\src\Libraries\common_lib\flash_mem\sst25.h 26 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/pmc/pmc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: pmc.h 3 | * Purpose: Provides low power mode entry routines 4 | * 5 | * Notes: 6 | */ 7 | 8 | #ifndef __PMC_H__ 9 | #define __PMC_H__ 10 | 11 | /********************************************************************/ 12 | /* 13 | LVWV if LVD high range selected 14 | 2.62 15 | 2.72 16 | 2.82 17 | 2.92 18 | LVDW if LVD low range selected 19 | 1.74 20 | 1.84 21 | 1.94 22 | 2.04 23 | */ 24 | /* 00 Low trip point selected (V LVD = V LVDL ) 25 | * 01 High trip point selected (V LVD = V LVDH ) 26 | */ 27 | #define VLVDH 1 28 | #define VLVDL 0 29 | #define LVDRESETEN 1 30 | #define LVDRESETDIS 0 31 | #define LVDINTEN 1 32 | #define LVDINTDIS 0 33 | /* 00 Low trip point selected (V LVW = V LVW1 ) 34 | * 01 Mid 1 trip point selected (V LVW = V LVW2 ) 35 | * 10 Mid 2 trip point selected (V LVW = V LVW3 ) 36 | * 11 High trip point selected (V LVW = V LVW4 ) 37 | */ 38 | #define VLVW4 3 39 | #define VLVW3 2 40 | #define VLVW2 1 41 | #define VLVW1 0 42 | #define LVWINTEN 1 43 | #define LVWINTDIS 0 44 | 45 | // function prototypes 46 | /* LVD initialization code */ 47 | void LVD_Initalize(unsigned char lvd_select, 48 | unsigned char lvd_reset_enable, 49 | unsigned char lvd_int_enable, 50 | unsigned char lvw_select, 51 | unsigned char lvw_int_enable); 52 | void LVD_Init(void); 53 | /* LVD interrupt service routine - If entering into this interrupt from stop you are in pbe mode.*/ 54 | void pmc_lvd_isr(void); 55 | 56 | /********************************************************************/ 57 | #endif /* __PMC_H__ */ 58 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/Flash/GT1022.lnp: -------------------------------------------------------------------------------- 1 | --cpu Cortex-M0+ 2 | ".\flash\project_main.o" 3 | ".\flash\project_common.o" 4 | ".\flash\app.o" 5 | ".\flash\power_management.o" 6 | ".\flash\gsm_gprs_tasks.o" 7 | ".\flash\sos_tasks.o" 8 | ".\flash\io_tasks.o" 9 | ".\flash\upload_config_task.o" 10 | ".\flash\gps_task.o" 11 | ".\flash\start.o" 12 | ".\flash\sysinit.o" 13 | ".\flash\system_mkl25z4.o" 14 | ".\flash\nmi_isr_handler.o" 15 | ".\flash\startup_mkl25z4.o" 16 | ".\flash\llwu.o" 17 | ".\flash\mcg.o" 18 | ".\flash\rcm.o" 19 | ".\flash\smc.o" 20 | ".\flash\uart.o" 21 | ".\flash\fmc.o" 22 | ".\flash\spi.o" 23 | ".\flash\hal_i2c.o" 24 | ".\flash\flash_ftfa.o" 25 | ".\flash\flash_ramfunc.o" 26 | ".\flash\usbcore.o" 27 | ".\flash\usbhw.o" 28 | ".\flash\usbdesc.o" 29 | ".\flash\usbuser.o" 30 | ".\flash\ringbuf.o" 31 | ".\flash\hiduser.o" 32 | ".\flash\sst25.o" 33 | ".\flash\modem.o" 34 | ".\flash\at_command_parser.o" 35 | ".\flash\system_config.o" 36 | ".\flash\m_time.o" 37 | ".\flash\sys_time.o" 38 | ".\flash\string_parser.o" 39 | ".\flash\db.o" 40 | ".\flash\tracker.o" 41 | ".\flash\gprs_cmd_ctrl.o" 42 | ".\flash\gps.o" 43 | ".\flash\tick.o" 44 | ".\flash\dbg_cfg_app.o" 45 | ".\flash\diskio.o" 46 | ".\flash\ff.o" 47 | ".\flash\flash_mem.o" 48 | ".\flash\audio.o" 49 | ".\flash\dtmf_app.o" 50 | ".\flash\dtmf.o" 51 | ".\flash\xl362_io.o" 52 | ".\flash\ambo_pedometer.o" 53 | ".\flash\pedometer_task.o" 54 | --library_type=microlib --strict --scatter ".\Flash\GT1022.sct" 55 | --summary_stderr --info summarysizes --map --xref --callgraph --symbols 56 | --info sizes --info totals --info unused --info veneers 57 | --list ".\UV4Build\GT1022.map" -o .\Flash\GT1022.axf -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/sos_tasks.h: -------------------------------------------------------------------------------- 1 | #ifndef _SOS_TASKS_H_ 2 | #define _SOS_TASKS_H_ 3 | 4 | #define MODE_CALL_CENTER 0 5 | #define MODE_FAMILY_VER1 1 6 | #define MODE_FAMILY_VER2 2 7 | #define SOS_CANCELLED 9 8 | 9 | #define PHONE_NO_LENGTH 16 10 | #define SAME_NUMBER 0 11 | #define DIFFERENT_NUMBER 1 12 | #define PHONE_DIGIT_THRESHOLD 6 13 | 14 | typedef enum { 15 | SOS_OFF = 0, 16 | SOS_KEY_ON, 17 | SOS_LONE_WORKER_ON, 18 | SOS_NO_MOVEMENT_ON, 19 | SOS_MAN_DOWN_ON 20 | } SOS_ACTION; 21 | 22 | typedef enum { 23 | SOS_CHECK = 0, 24 | SOS_START, 25 | SOS_WAIT_MODEM_INIT, 26 | SOS_WAIT_SEND_DATA, 27 | SOS_WAIT_SEND_SMS, 28 | SOS_INIT, 29 | SOS_WAIT_INIT, 30 | CALL_CENTER_CALL_INIT, 31 | CALL_CENTER_WAIT_CALLING, 32 | CALL_CENTER_IN_CALLING, 33 | CALL_CENTER_SOS_END, 34 | WAIT_DTMF_KEY_PRESS_INIT, 35 | WAIT_DTMF_KEY_PRESS, 36 | FAMILY_VER1_CALL_INIT, 37 | FAMILY_VER1_WAIT_CALLING, 38 | FAMILY_VER1_IN_CALLING, 39 | FAMILY_VER1_NOT_PRESS_KEY, 40 | FAMILY_VER1_SOS_END, 41 | FAMILY_VER2_CALL_INIT, 42 | FAMILY_VER2_SEND_SMS, 43 | FAMILY_VER2_WAIT_CALLING, 44 | FAMILY_VER2_CHECK_PHONE_CALL, 45 | FAMILY_VER2_WAIT_ANSWER_CALL, 46 | FAMILY_VER2_WAIT_END_CALL, 47 | FAMILY_VER2_SOS_END, 48 | SOS_END 49 | } SOS_PHASE_TYPE; 50 | 51 | uint8_t Sos_Task(void); 52 | SOS_PHASE_TYPE SosTask_GetPhase(void); 53 | void SosTask_Init(void); 54 | void SosTask_Start(void); 55 | void SosTask_End(void); 56 | uint8_t SosTask_IsCancelCall(void); 57 | uint8_t SosTask_IsAlarmActivated(void); 58 | uint8_t SosTask_IsWaititngForCall(void); 59 | void SosTask_Reset(void); 60 | uint8_t ComparePhoneNumber(char* phone1, char* phone2); 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_main/pemicro_connection_settings.ini: -------------------------------------------------------------------------------- 1 | [STARTUP] 2 | CPUTARGETTYPENAME=ARM Processor - Autodetect 3 | USE_CYCLONEPRO_RELAYS=1 4 | CYCLONEPRO_POWEROFFONEXIT=0 5 | CYCLONEPRO_CURRENTVOLTAGE=255 6 | CYCLONEPRO_POWERDOWNDELAY=250 7 | CYCLONEPRO_POWERUPDELAY=250 8 | MULTILINK_POWERDOWNDELAY=250 9 | MULTILINK_POWERUPDELAY=1000 10 | USE_SWD=1 11 | IO_DELAY_CNT=0 12 | FREQ_FX=4 13 | FREQ_NORMAL=0 14 | FREQ_OSJTAG=0 15 | FREQ_CYCLONE=3 16 | FREQ_TRACELINK=3 17 | FREQ_LIGHTNING=1 18 | FREQ_OPENSDA=22 19 | RESET_DELAY=0 20 | PORT=181 21 | INTERFACE_SELECTION=7 22 | SHOWDIALOG=0 23 | TRACELINK_MAXBUFFERSIZE=1 24 | 25 | [PORT] 26 | IP= 27 | 28 | [PEDEBUG] 29 | ERASE_PROGRAM_WITHOUT_ASKING=1 30 | CURRENTDEVICE=KL25Z128M4 31 | CURRENTMODE=4 32 | AUTO_SYNC=1 33 | 34 | [DEVICE] 35 | CHIPMODE=KL25Z128M4 36 | 37 | [STARTUP12] 38 | SHOW_HSTEP_ASSEMBLY_DETAILS=0 39 | 40 | [ARM] 41 | FILE1= 42 | BINTORAM=1 43 | BINTOFLASH=0 44 | BINTOFLASHDEFAULT=0 45 | GOTILMAIN=0 46 | KEEPCPROGOPEN=0 47 | 48 | [SETTINGS] 49 | DEFAULT_SOURCE_PATH=C:\Keil\ARM\PEMicro\P&E 50 | MEMORYSTART1=0 51 | MEMORYSTART2=0 52 | 53 | [SAVESETTINGS] 54 | S19FILENAME= 55 | PRGFILENAME= 56 | PRGFILEPATH=C:\Keil\ARM\PEMicro\P&E 57 | SERIALFILENAME= 58 | 59 | [KL25Z128M4] 60 | DOTRIM=1 61 | PRESERVE1_START=0 62 | PRESERVE1_END=0 63 | PRESERVE1_ACTIVE=0 64 | PRESERVE2_START=0 65 | PRESERVE2_END=0 66 | PRESERVE2_ACTIVE=0 67 | PRESERVE3_START=0 68 | PRESERVE3_END=0 69 | PRESERVE3_ACTIVE=0 70 | PRESERVE_EEPROM=0 71 | CUSTOM_TRIM=0 72 | NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY=0 73 | CURRENT_ALGORITHM_INDEX=0 74 | ALTERNATIVE_ALGORITHM_PATH= 75 | ALTERNATIVE_ALGORITHM_CHECKBOX=0 76 | PRESERVE_EEPROM_START=0 77 | PRESERVE_EEPROM_END=0 78 | ENABLE_FLASH_PROGRAMMING_DIALOG=0 79 | 80 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/pemicro_connection_settings.ini: -------------------------------------------------------------------------------- 1 | [STARTUP] 2 | CPUTARGETTYPENAME=ARM Processor - Autodetect 3 | USE_CYCLONEPRO_RELAYS=1 4 | CYCLONEPRO_POWEROFFONEXIT=0 5 | CYCLONEPRO_CURRENTVOLTAGE=255 6 | CYCLONEPRO_POWERDOWNDELAY=250 7 | CYCLONEPRO_POWERUPDELAY=250 8 | MULTILINK_POWERDOWNDELAY=250 9 | MULTILINK_POWERUPDELAY=1000 10 | USE_SWD=1 11 | IO_DELAY_CNT=0 12 | FREQ_FX=4 13 | FREQ_NORMAL=0 14 | FREQ_OSJTAG=0 15 | FREQ_CYCLONE=3 16 | FREQ_TRACELINK=3 17 | FREQ_LIGHTNING=1 18 | FREQ_OPENSDA=22 19 | RESET_DELAY=0 20 | PORT=181 21 | INTERFACE_SELECTION=7 22 | SHOWDIALOG=0 23 | TRACELINK_MAXBUFFERSIZE=1 24 | 25 | [PORT] 26 | IP= 27 | 28 | [PEDEBUG] 29 | ERASE_PROGRAM_WITHOUT_ASKING=1 30 | CURRENTDEVICE=KL25Z128M4 31 | CURRENTMODE=4 32 | AUTO_SYNC=1 33 | 34 | [DEVICE] 35 | CHIPMODE=KL25Z128M4 36 | 37 | [STARTUP12] 38 | SHOW_HSTEP_ASSEMBLY_DETAILS=0 39 | 40 | [ARM] 41 | FILE1= 42 | BINTORAM=1 43 | BINTOFLASH=0 44 | BINTOFLASHDEFAULT=0 45 | GOTILMAIN=0 46 | KEEPCPROGOPEN=0 47 | 48 | [SETTINGS] 49 | DEFAULT_SOURCE_PATH=C:\Keil\ARM\PEMicro\P&E 50 | MEMORYSTART1=0 51 | MEMORYSTART2=0 52 | 53 | [SAVESETTINGS] 54 | S19FILENAME= 55 | PRGFILENAME= 56 | PRGFILEPATH=C:\Keil\ARM\PEMicro\P&E 57 | SERIALFILENAME= 58 | 59 | [KL25Z128M4] 60 | DOTRIM=1 61 | PRESERVE1_START=0 62 | PRESERVE1_END=0 63 | PRESERVE1_ACTIVE=0 64 | PRESERVE2_START=0 65 | PRESERVE2_END=0 66 | PRESERVE2_ACTIVE=0 67 | PRESERVE3_START=0 68 | PRESERVE3_END=0 69 | PRESERVE3_ACTIVE=0 70 | PRESERVE_EEPROM=0 71 | CUSTOM_TRIM=0 72 | NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY=0 73 | CURRENT_ALGORITHM_INDEX=0 74 | ALTERNATIVE_ALGORITHM_PATH= 75 | ALTERNATIVE_ALGORITHM_CHECKBOX=0 76 | PRESERVE_EEPROM_START=0 77 | PRESERVE_EEPROM_END=0 78 | ENABLE_FLASH_PROGRAMMING_DIALOG=0 79 | 80 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/median.c: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2006 Freescale Semiconductor 3 | Freescale Confidential Proprietary 4 | \file median.c 5 | \brief Calculates the median of 8 integer samples 6 | \author Freescale Semiconductor 7 | \author Luis Puebla 8 | \author Guadalajara Applications Laboratory RTAC Americas 9 | \version 10 | \date 11 | \warning (If needed) 12 | 13 | * History: 14 | 15 | */ 16 | 17 | 18 | 19 | 20 | #include "median.h" 21 | 22 | 23 | /** 24 | * \brief Calculates the median of 8 integer samples 25 | * \author Luis Puebla 26 | * \param new_value, struct tipo_mediana *medicion 27 | * \return a median value of the last 8 samples 28 | * \todo 29 | * \warning 30 | */ 31 | int median(int new_value, struct tipo_mediana *medicion) 32 | { 33 | int buffer_ord[NUM_MUESTRAS_MEDIANA]; 34 | int i; 35 | int temp1; 36 | int bandera; 37 | 38 | medicion->ap_muestras++; 39 | medicion->ap_muestras &= 0x7; // from 0 to 7 40 | medicion->buffer_muestras[medicion->ap_muestras]=new_value; 41 | // temporarily copy the buffer 42 | for(i=0;i<8;i++) buffer_ord[i]=medicion->buffer_muestras[i]; 43 | // order the temporary buffer 44 | do 45 | { 46 | bandera=0; 47 | for (i=0;i<7;i++) 48 | { 49 | if (buffer_ord[i] > buffer_ord[i+1]) 50 | { 51 | temp1 = buffer_ord[i]; 52 | buffer_ord[i] = buffer_ord[i+1]; 53 | buffer_ord[i+1] = temp1; 54 | bandera=1; 55 | } 56 | } 57 | } 58 | 59 | while (bandera); 60 | //temp1= (buffer_ord[3] + buffer_ord[4])/2; 61 | temp1= buffer_ord[3]; 62 | return temp1; 63 | } 64 | 65 | 66 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/FTFA/flash_FTFA.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | * 3 | * Freescale Semiconductor Inc. 4 | * (c) Copyright 2004-2010 Freescale Semiconductor, Inc. 5 | * ALL RIGHTS RESERVED. 6 | * 7 | **************************************************************************//*! 8 | * 9 | * @file flash_FTFA.h 10 | * 11 | * @author 12 | * 13 | * @version 14 | * 15 | * @date 16 | * 17 | * @brief flash driver header file 18 | * 19 | *****************************************************************************/ 20 | 21 | /*********************************** Includes ***********************************/ 22 | 23 | /*********************************** Macros ************************************/ 24 | 25 | /*********************************** Defines ***********************************/ 26 | #ifndef _FLASH_FTFA_H_ 27 | #define _FLASH_FTFA_H_ 28 | #include 29 | /* error code */ 30 | #define Flash_OK 0x00 31 | #define Flash_FACCERR 0x01 32 | #define Flash_FPVIOL 0x02 33 | #define Flash_MGSTAT0 0x04 34 | #define Flash_RDCOLERR 0x08 35 | #define Flash_NOT_ERASED 0x10 36 | #define Flash_CONTENTERR 0x11 37 | 38 | /* flash commands */ 39 | #define FlashCmd_ProgramLongWord 0x06 40 | #define FlashCmd_SectorErase 0x09 41 | 42 | 43 | /********************************** Constant ***********************************/ 44 | 45 | /*********************************** Variables *********************************/ 46 | 47 | /*********************************** Prototype *********************************/ 48 | void Flash_Init(int a); 49 | unsigned char Flash_SectorErase(uint32_t FlashPtr); 50 | unsigned char Flash_ByteProgram(uint32_t FlashStartAdd,uint32_t *DataSrcPtr,uint32_t NumberOfBytes); 51 | #endif /*_FLASH_FTFA_H_*/ 52 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/DTMF.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * Name: DTMF.h 3 | * Purpose: DTMF Signal Processing Defines 4 | * Version: V1.00 5 | * Note(s): 6 | *---------------------------------------------------------------------------- 7 | * This file is part of the uVision/ARM development tools. 8 | * This software may only be used under the terms of a valid, current, 9 | * end user licence from KEIL for a compatible version of KEIL software 10 | * development tools. Nothing else gives you the right to use this software. 11 | * 12 | * This software is supplied "AS IS" without warranties of any kind. 13 | * 14 | * Copyright (c) 2008 Keil - An ARM Company. All rights reserved. 15 | *---------------------------------------------------------------------------- 16 | * History: 17 | * V1.00 Initial Version 18 | *----------------------------------------------------------------------------*/ 19 | 20 | #ifndef __DTMF_H 21 | #define __DTMF_H 22 | 23 | #define DTMF_DATA_DEEP 128 24 | #define DTMFsz 256 // DTMF Input Buffer 25 | 26 | typedef struct DTMF { 27 | unsigned int AIindex; // Input Data Index 28 | unsigned int AIcheck; // Index Window Trigger for DTMF check 29 | unsigned char digit; // detected digit 30 | unsigned char early; // early detected digit 31 | unsigned char new; // set to 1 when new digit detected 32 | unsigned char d[4]; // last four detected digits 33 | unsigned int d_i; // index 34 | unsigned short AInput[DTMFsz]; // A/D Input Data 35 | } DTMF; 36 | 37 | extern DTMF dail1; // DTMF info of one input 38 | 39 | extern void DTMF_Detect (DTMF *t);// check for valid DTMF tone 40 | 41 | 42 | #endif // __DTMF_H 43 | -------------------------------------------------------------------------------- /firmware/source/build/keil/project_bootloader/Flash/usbcore.d: -------------------------------------------------------------------------------- 1 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbcore.c 2 | .\flash\usbcore.o: C:\Keil\ARM\ARMCC\bin\..\include\stdlib.h 3 | .\flash\usbcore.o: C:\Keil\ARM\ARMCC\bin\..\include\stdint.h 4 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usb.h 5 | .\flash\usbcore.o: ..\..\..\src\projects\project_bootloader\usbcfg.h 6 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbhw.h 7 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\usbcore.h 8 | .\flash\usbcore.o: ..\..\..\src\projects\project_bootloader\usbdesc.h 9 | .\flash\usbcore.o: ..\..\..\src\projects\project_bootloader\usbuser.h 10 | .\flash\usbcore.o: ..\..\..\src\common\common.h 11 | .\flash\usbcore.o: ..\..\..\src\platforms\freedom.h 12 | .\flash\usbcore.o: ..\..\..\src\drivers\mcg\mcg.h 13 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\MKL25Z4.h 14 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cm0plus.h 15 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cmInstr.h 16 | .\flash\usbcore.o: C:\Keil\ARM\CMSIS\Include\core_cmFunc.h 17 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MKL25Z4\Include\system_MKL25Z4.h 18 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 19 | .\flash\usbcore.o: ..\..\..\src\common\assert.h 20 | .\flash\usbcore.o: ..\..\..\src\common\io.h 21 | .\flash\usbcore.o: ..\..\..\src\common\startup.h 22 | .\flash\usbcore.o: ..\..\..\src\cpu\headers\CMSIS\MemMapPtr_KL25Z4.h 23 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\hid.h 24 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\hiduser.h 25 | .\flash\usbcore.o: ..\..\..\src\Libraries\common_lib\ringbuff\ringbuf.h 26 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\msc.h 27 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\mscuser.h 28 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\cdc.h 29 | .\flash\usbcore.o: ..\..\..\src\drivers\usb\cdcuser.h 30 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/spi/spi.c: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file 4 | * spi driver 5 | * \author 6 | * Nguyen Van Hai 7 | */ 8 | #include "spi.h" 9 | 10 | 11 | 12 | void SPI_Init(void) 13 | { 14 | /* SIM_SCGC4: SPI0=1 */ 15 | SIM_SCGC4 |= SIM_SCGC4_SPI1_MASK; 16 | SIM_SCGC5 |= SIM_SCGC5_PORTD_MASK; 17 | 18 | PORTA_PCR2 = PORT_PCR_MUX(0x01) | PORT_PCR_DSE_MASK | PORT_PCR_PE_MASK; 19 | PORTD_PCR2 = PORT_PCR_MUX(0x01) | PORT_PCR_DSE_MASK | PORT_PCR_PE_MASK; 20 | PORTD_PCR5 = PORT_PCR_MUX(0x02) | PORT_PCR_DSE_MASK | PORT_PCR_PE_MASK; 21 | PORTB_PCR17 = PORT_PCR_MUX(0x05) | PORT_PCR_DSE_MASK | PORT_PCR_PE_MASK; 22 | PORTD_PCR7 = PORT_PCR_MUX(0x02) | PORT_PCR_DSE_MASK | PORT_PCR_PE_MASK; 23 | 24 | GPIOD_PDDR |= 1 << 2; 25 | GPIOA_PDDR |= 1 << 2; 26 | 27 | HAL_SPI_CS_DEASSERT; 28 | HAL_SPI_ACCEL_CS_DEASSERT; 29 | 30 | /* SPI1_C1: SPIE=0,SPE=0,SPTIE=0,MSTR=1,CPOL=1,CPHA=1,SSOE=1,LSBFE=0 */ 31 | SPI1_C1 &= ~SPI_C1_SPE_MASK; 32 | SPI1_C1 = SPI_C1_MSTR_MASK; /* Set configuration register */ 33 | /* SPI1_BR: ??=0,SPPR=2,SPR=5 */ 34 | SPI1_BR = (SPI_BR_SPPR(0x02) | SPI_BR_SPR(0x01)); /* Set baud rate register */ 35 | /* SPI1_C1: SPE=1 */ 36 | SPI1_C1 |= SPI_C1_SPE_MASK; /* Enable SPI module */ 37 | } 38 | 39 | uint8_t halSpiWriteByte(uint8_t data) 40 | { 41 | uint8_t rc; 42 | uint32_t timeOut = SPI_TIMEOUT; 43 | while(!(SPI1_S & SPI_S_SPTEF_MASK)) 44 | { 45 | if(timeOut-- == 0) return 0xff; 46 | } 47 | /* Write in the DR register the data to be sent */ 48 | SPI1_D = data; 49 | while(!(SPI1_S & SPI_S_SPRF_MASK)) 50 | { 51 | if(timeOut-- == 0) return 0xff; 52 | } 53 | rc = SPI1_D;; 54 | return rc; 55 | } 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/acclerometer/hal_dev_mma8451.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "common.h" 4 | #include "hal_i2c.h" 5 | 6 | 7 | 8 | #define MMA8451_I2C_ADDRESS (0x1d<<1) 9 | #define I2C0_B I2C1_BASE_PTR 10 | 11 | void hal_dev_mma8451_init(void) 12 | { 13 | hal_i2c_init(I2C0_B); 14 | } 15 | 16 | 17 | 18 | 19 | // this delay is very important, it may cause w-r operation failure. 20 | static void pause(void) 21 | { 22 | int n; 23 | for(n=0; n<40; n++); 24 | #ifndef CMSIS 25 | asm ("NOP"); // Toggle LED1 26 | #else 27 | __nop(); 28 | #endif 29 | } 30 | uint8 hal_dev_mma8451_read_reg(uint8 addr) 31 | { 32 | uint8 result; 33 | 34 | i2c_start(I2C0_B); 35 | i2c_write_byte(I2C0_B, MMA8451_I2C_ADDRESS | I2C_WRITE); 36 | 37 | i2c_wait(I2C0_B); 38 | i2c_get_ack(I2C0_B); 39 | 40 | i2c_write_byte(I2C0_B, addr); 41 | i2c_wait(I2C0_B); 42 | i2c_get_ack(I2C0_B); 43 | 44 | i2c_repeated_start(I2C0_B); 45 | i2c_write_byte(I2C0_B, MMA8451_I2C_ADDRESS | I2C_READ); 46 | i2c_wait(I2C0_B); 47 | i2c_get_ack(I2C0_B); 48 | 49 | i2c_set_rx_mode(I2C0_B); 50 | 51 | i2c_give_nack(I2C0_B); 52 | result = i2c_read_byte(I2C0_B); 53 | i2c_wait(I2C0_B); 54 | 55 | i2c_stop(I2C0_B); 56 | result = i2c_read_byte(I2C0_B); 57 | pause(); 58 | return result; 59 | } 60 | void hal_dev_mma8451_write_reg(uint8 addr, uint8 data) 61 | { 62 | i2c_start(I2C0_B); 63 | 64 | i2c_write_byte(I2C0_B, MMA8451_I2C_ADDRESS|I2C_WRITE); 65 | i2c_wait(I2C0_B); 66 | i2c_get_ack(I2C0_B); 67 | 68 | i2c_write_byte(I2C0_B, addr); 69 | i2c_wait(I2C0_B); 70 | i2c_get_ack(I2C0_B); 71 | 72 | i2c_write_byte(I2C0_B, data); 73 | i2c_wait(I2C0_B); 74 | i2c_get_ack(I2C0_B); 75 | 76 | i2c_stop(I2C0_B); 77 | pause(); 78 | } 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/tick/tick.h: -------------------------------------------------------------------------------- 1 | #ifndef __TICK_H__ 2 | #define __TICK_H__ 3 | #include 4 | 5 | #define TICK_SECOND 1000 6 | 7 | #define TIME_MS(x) x 8 | #define TIME_SEC(x) (x*1000) 9 | 10 | #define TIMEOUT 0 11 | #define TIMEIN 1 12 | 13 | #define KEY_DOWN 0 14 | #define KEY_UP 1 15 | 16 | #define WATCHDOG_NUM 3 /*MAIN + Timer0 + Timer1*/ 17 | 18 | typedef struct { 19 | uint32_t start_time; 20 | uint32_t timeout; 21 | uint32_t crc; 22 | } Timeout_Type; 23 | 24 | typedef struct { 25 | uint8_t *buff; 26 | uint8_t index; 27 | uint8_t len; 28 | }COMPARE_TYPE; 29 | 30 | 31 | typedef struct 32 | { 33 | uint8_t lastStatus; 34 | uint32_t lastTime; 35 | uint8_t status; 36 | uint32_t time; 37 | uint8_t saveBit; 38 | uint32_t pressTime; 39 | uint32_t pressed; 40 | } _KEY_TYPE; 41 | 42 | typedef struct 43 | { 44 | _KEY_TYPE sos; 45 | _KEY_TYPE pwr; 46 | } KEY_TYPE; 47 | 48 | extern KEY_TYPE key; 49 | 50 | extern volatile uint32_t rtcTimeSec; 51 | extern uint8_t ledControlEnable; 52 | extern uint8_t loneWorkerWarningFlag, flagLoneWorkerReset; 53 | extern uint8_t noMovementWarningFlag, flagNoMovementReset; 54 | extern uint8_t manDownWarningFlag, flagManDownReset; 55 | extern uint8_t ringingDetectFlag; 56 | 57 | 58 | void LPTimerTask(void); 59 | void LPTMR_init(int count, int clock_source); 60 | void TICK_Init(uint32_t timeMs,uint32_t coreClock); 61 | void TICK_DeInit(void); 62 | uint32_t TICK_Get(void); 63 | uint32_t TICK_Get64(void); 64 | void UpdateRtcTime(uint32_t updateTimeSec); 65 | void DelayMs(uint32_t ms); 66 | void InitTimeout(Timeout_Type *t,uint32_t timeout); 67 | uint32_t CheckTimeout(Timeout_Type *t); 68 | void InitFindData(COMPARE_TYPE *cmpData,uint8_t *data); 69 | uint8_t FindData(COMPARE_TYPE *cmpData,uint8_t c); 70 | uint8_t GetKeyPressed(_KEY_TYPE *key); 71 | void ClearLastKeyStatus(_KEY_TYPE *key); 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/usb/usbhw.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------------------ 2 | * RL-ARM - USB 3 | *------------------------------------------------------------------------------ 4 | * Name: usbd_hw.h 5 | * Purpose: USB Device Hardware Layer header file 6 | * Rev.: V4.70 7 | *------------------------------------------------------------------------------ 8 | * This code is part of the RealView Run-Time Library. 9 | * Copyright (c) 2004-2013 KEIL - An ARM Company. All rights reserved. 10 | *----------------------------------------------------------------------------*/ 11 | 12 | #ifndef __USB_HW_H__ 13 | #define __USB_HW_H__ 14 | #include 15 | #include "usb.h" 16 | 17 | /* USB Hardware Functions */ 18 | extern void USB_Init (void); 19 | extern void USB_Connect (uint32_t con); 20 | extern void USB_Reset (void); 21 | extern void USB_Suspend (void); 22 | extern void USB_Resume (void); 23 | extern void USB_WakeUp (void); 24 | extern void USB_WakeUpCfg (uint32_t cfg); 25 | extern void USB_SetAddress (uint32_t adr); 26 | extern void USB_Configure (uint32_t cfg); 27 | extern void USB_ConfigEP (USB_ENDPOINT_DESCRIPTOR *pEPD); 28 | extern void USB_DirCtrlEP (uint32_t dir); 29 | extern void USB_EnableEP (uint32_t EPNum); 30 | extern void USB_DisableEP (uint32_t EPNum); 31 | extern void USB_ResetEP (uint32_t EPNum); 32 | extern void USB_SetStallEP (uint32_t EPNum); 33 | extern void USB_ClrStallEP (uint32_t EPNum); 34 | extern void USB_ClearEPBuf (uint32_t EPNum); 35 | extern uint32_t USB_ReadEP (uint32_t EPNum, uint8_t *pData); 36 | extern uint32_t USB_WriteEP (uint32_t EPNum, uint8_t *pData, uint32_t cnt); 37 | extern uint32_t USB_GetFrame (void); 38 | extern uint32_t USB_GetError (void); 39 | 40 | 41 | #endif /* __USB_HW_H__ */ 42 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/usb/mscuser.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: MSCUSER.H 5 | * Purpose: Mass Storage Class Custom User Definitions 6 | * Version: V1.10 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC family microcontroller devices only. Nothing 14 | * else gives you the right to use this software. 15 | * 16 | * Copyright (c) 2005-2009 Keil Software. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __MSCUSER_H__ 20 | #define __MSCUSER_H__ 21 | #include 22 | 23 | #define MSC_FLASH_START 0x00600000 24 | #define MSC_SECTOR_SIZE 512 25 | #define MSC_MEMORY_SIZE 0x200000 26 | #define MSC_NUM_SECTOR_MAX (MSC_MEMORY_SIZE / MSC_SECTOR_SIZE) 27 | 28 | 29 | /* Max In/Out Packet Size */ 30 | #define MSC_MAX_PACKET 64 31 | 32 | /* MSC In/Out Endpoint Address */ 33 | #define MSC_EP_IN 0x82 34 | #define MSC_EP_OUT 0x02 35 | 36 | /* MSC Requests Callback Functions */ 37 | extern uint32_t MSC_Reset (void); 38 | extern uint32_t MSC_GetMaxLUN (void); 39 | 40 | /* MSC Bulk Callback Functions */ 41 | extern void MSC_GetCBW (void); 42 | extern void MSC_SetCSW (void); 43 | extern void MSC_BulkIn (void); 44 | extern void MSC_BulkOut(void); 45 | 46 | 47 | #endif /* __MSCUSER_H__ */ 48 | -------------------------------------------------------------------------------- /firmware/source/src/drivers/usb/hiduser.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: HIDUSER.H 5 | * Purpose: HID Custom User Definitions 6 | * Version: V1.10 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC family microcontroller devices only. Nothing 14 | * else gives you the right to use this software. 15 | * 16 | * Copyright (c) 2005-2009 Keil Software. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __HIDUSER_H__ 20 | #define __HIDUSER_H__ 21 | #include 22 | #include "ringbuf.h" 23 | 24 | /* HID Number of Reports */ 25 | #define HID_REPORT_NUM 1 26 | 27 | extern RINGBUF HID_TxRingBuff; 28 | extern RINGBUF HID_RxRingBuff; 29 | extern uint8_t HID_DepInEmpty; 30 | extern uint8_t HID_TxBuff[256]; 31 | extern uint8_t HID_RxBuff[64]; 32 | 33 | /* HID Global Variables */ 34 | extern uint8_t HID_Protocol; 35 | extern uint8_t HID_IdleTime[HID_REPORT_NUM]; 36 | 37 | /* HID Requests Callback Functions */ 38 | extern uint32_t HID_GetReport (void); 39 | extern uint32_t HID_SetReport (void); 40 | extern uint32_t HID_GetIdle (void); 41 | extern uint32_t HID_SetIdle (void); 42 | extern uint32_t HID_GetProtocol (void); 43 | extern uint32_t HID_SetProtocol (void); 44 | 45 | 46 | #endif /* __HIDUSER_H__ */ 47 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_bootloader/mscuser.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: MSCUSER.H 5 | * Purpose: Mass Storage Class Custom User Definitions 6 | * Version: V1.10 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC family microcontroller devices only. Nothing 14 | * else gives you the right to use this software. 15 | * 16 | * Copyright (c) 2005-2009 Keil Software. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __MSCUSER_H__ 20 | #define __MSCUSER_H__ 21 | #include 22 | 23 | #define MSC_FLASH_START 0x00600000 24 | #define MSC_SECTOR_SIZE 512 25 | #define MSC_MEMORY_SIZE 0x200000 26 | #define MSC_NUM_SECTOR_MAX (MSC_MEMORY_SIZE / MSC_SECTOR_SIZE) 27 | 28 | 29 | /* Max In/Out Packet Size */ 30 | #define MSC_MAX_PACKET 64 31 | 32 | /* MSC In/Out Endpoint Address */ 33 | #define MSC_EP_IN 0x82 34 | #define MSC_EP_OUT 0x02 35 | 36 | /* MSC Requests Callback Functions */ 37 | extern uint32_t MSC_Reset (void); 38 | extern uint32_t MSC_GetMaxLUN (void); 39 | 40 | /* MSC Bulk Callback Functions */ 41 | extern void MSC_GetCBW (void); 42 | extern void MSC_SetCSW (void); 43 | extern void MSC_BulkIn (void); 44 | extern void MSC_BulkOut(void); 45 | 46 | 47 | #endif /* __MSCUSER_H__ */ 48 | -------------------------------------------------------------------------------- /firmware/source/src/Libraries/common_lib/angle_calculation/asin.c: -------------------------------------------------------------------------------- 1 | 2 | const int my_asin[128] = { 3 | 0, 4 | 7, 5 | 14, 6 | 21, 7 | 28, 8 | 35, 9 | 43, 10 | 50, 11 | 57, 12 | 64, 13 | 71, 14 | 78, 15 | 85, 16 | 92, 17 | 99, 18 | 106, 19 | 113, 20 | 120, 21 | 128, 22 | 135, 23 | 142, 24 | 149, 25 | 156, 26 | 163, 27 | 170, 28 | 177, 29 | 184, 30 | 191, 31 | 198, 32 | 206, 33 | 213, 34 | 220, 35 | 227, 36 | 234, 37 | 241, 38 | 248, 39 | 255, 40 | 262, 41 | 269, 42 | 276, 43 | 283, 44 | 291, 45 | 298, 46 | 305, 47 | 312, 48 | 319, 49 | 326, 50 | 333, 51 | 340, 52 | 347, 53 | 354, 54 | 361, 55 | 369, 56 | 376, 57 | 383, 58 | 390, 59 | 397, 60 | 404, 61 | 411, 62 | 418, 63 | 425, 64 | 432, 65 | 439, 66 | 446, 67 | 454, 68 | 461, 69 | 468, 70 | 475, 71 | 482, 72 | 489, 73 | 496, 74 | 503, 75 | 510, 76 | 517, 77 | 524, 78 | 531, 79 | 539, 80 | 546, 81 | 553, 82 | 560, 83 | 567, 84 | 574, 85 | 581, 86 | 588, 87 | 595, 88 | 602, 89 | 609, 90 | 617, 91 | 624, 92 | 631, 93 | 638, 94 | 645, 95 | 652, 96 | 659, 97 | 666, 98 | 673, 99 | 680, 100 | 687, 101 | 694, 102 | 702, 103 | 709, 104 | 716, 105 | 723, 106 | 730, 107 | 737, 108 | 744, 109 | 751, 110 | 758, 111 | 765, 112 | 772, 113 | 780, 114 | 787, 115 | 794, 116 | 801, 117 | 808, 118 | 815, 119 | 822, 120 | 829, 121 | 836, 122 | 843, 123 | 850, 124 | 857, 125 | 865, 126 | 872, 127 | 879, 128 | 886, 129 | 893, 130 | 900 131 | }; 132 | 133 | 134 | -------------------------------------------------------------------------------- /firmware/source/src/projects/project_main/usbdesc.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------- 2 | * U S B - K e r n e l 3 | *---------------------------------------------------------------------------- 4 | * Name: usbdesc.h 5 | * Purpose: USB Descriptors Definitions 6 | * Version: V1.20 7 | *---------------------------------------------------------------------------- 8 | * This software is supplied "AS IS" without any warranties, express, 9 | * implied or statutory, including but not limited to the implied 10 | * warranties of fitness for purpose, satisfactory quality and 11 | * noninfringement. Keil extends you a royalty-free right to reproduce 12 | * and distribute executable files created using this software for use 13 | * on NXP Semiconductors LPC microcontroller devices only. Nothing else 14 | * gives you the right to use this software. 15 | * 16 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. 17 | *---------------------------------------------------------------------------*/ 18 | 19 | #ifndef __USBDESC_H__ 20 | #define __USBDESC_H__ 21 | 22 | 23 | #define WBVAL(x) (x & 0xFF),((x >> 8) & 0xFF) 24 | 25 | #define USB_DEVICE_DESC_SIZE (sizeof(USB_DEVICE_DESCRIPTOR)) 26 | #define USB_CONFIGUARTION_DESC_SIZE (sizeof(USB_CONFIGURATION_DESCRIPTOR)) 27 | #define USB_INTERFACE_DESC_SIZE (sizeof(USB_INTERFACE_DESCRIPTOR)) 28 | #define USB_ENDPOINT_DESC_SIZE (sizeof(USB_ENDPOINT_DESCRIPTOR)) 29 | 30 | #define HID_DESC_OFFSET 0x0054 31 | #define HID_DESC_SIZE (sizeof(HID_DESCRIPTOR)) 32 | #define HID_REPORT_DESC_SIZE (sizeof(HID_ReportDescriptor)) 33 | 34 | extern const uint8_t USB_DeviceDescriptor[]; 35 | extern const uint8_t USB_ConfigDescriptor[]; 36 | extern const uint8_t USB_StringDescriptor[]; 37 | 38 | extern const uint8_t HID_ReportDescriptor[]; 39 | extern const uint16_t HID_ReportDescSize; 40 | 41 | 42 | #endif /* __USBDESC_H__ */ 43 | --------------------------------------------------------------------------------