mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
This update adds additional support for file. Files can now be opened
closed, read, written in bytes by position (block reads and writes) and piped to other files during idle periods (for large files). check_size.sh has a modification for OSX that allows the same functionality as on other unix like environments. Since DU does not function the same, gdu must be loaded on the system (through macports or some other channel). The modification is simply to use gdu instead of du. This commit also includes a QT creator project file and associated settings.
This commit is contained in:
parent
ceabbbf39c
commit
ac7d4f4359
1
Espruino.config
Normal file
1
Espruino.config
Normal file
@ -0,0 +1 @@
|
||||
// ADD PREDEFINED MACROS HERE!
|
||||
1
Espruino.creator
Normal file
1
Espruino.creator
Normal file
@ -0,0 +1 @@
|
||||
[General]
|
||||
742
Espruino.files
Normal file
742
Espruino.files
Normal file
@ -0,0 +1,742 @@
|
||||
code/extra/m25p16.c
|
||||
code/extra/m25p16.h
|
||||
libs/fat_sd/option/cc932.c
|
||||
libs/fat_sd/option/cc936.c
|
||||
libs/fat_sd/option/cc949.c
|
||||
libs/fat_sd/option/cc950.c
|
||||
libs/fat_sd/option/ccsbcs.c
|
||||
libs/fat_sd/option/syncobj.c
|
||||
libs/fat_sd/option/unicode.c
|
||||
libs/fat_sd/diskio.h
|
||||
libs/fat_sd/fattime.c
|
||||
libs/fat_sd/fattime.h
|
||||
libs/fat_sd/ff.c
|
||||
libs/fat_sd/ff.h
|
||||
libs/fat_sd/ffconf.h
|
||||
libs/fat_sd/integer.h
|
||||
libs/fat_sd/sdio_diskio.c
|
||||
libs/fat_sd/sdio_sdcard.c
|
||||
libs/fat_sd/sdio_sdcard.h
|
||||
libs/fat_sd/spi_diskio.c
|
||||
libs/graphics/bitmap_font_3x5.c
|
||||
libs/graphics/bitmap_font_3x5.h
|
||||
libs/graphics/bitmap_font_4x6.c
|
||||
libs/graphics/bitmap_font_4x6.h
|
||||
libs/graphics/bitmap_font_8x8.c
|
||||
libs/graphics/bitmap_font_8x8.h
|
||||
libs/graphics/graphics.c
|
||||
libs/graphics/graphics.h
|
||||
libs/graphics/jswrap_graphics.c
|
||||
libs/graphics/jswrap_graphics.h
|
||||
libs/graphics/lcd_arraybuffer.c
|
||||
libs/graphics/lcd_arraybuffer.h
|
||||
libs/graphics/lcd_fsmc.c
|
||||
libs/graphics/lcd_fsmc.h
|
||||
libs/graphics/lcd_js.c
|
||||
libs/graphics/lcd_js.h
|
||||
libs/graphics/lcd_pcd8544.c
|
||||
libs/graphics/lcd_pcd8544.h
|
||||
libs/graphics/lcd_sdl.c
|
||||
libs/graphics/lcd_sdl.h
|
||||
libs/graphics/vector_font.h
|
||||
libs/math/acosh.c
|
||||
libs/math/asin.c
|
||||
libs/math/asinh.c
|
||||
libs/math/atan.c
|
||||
libs/math/atanh.c
|
||||
libs/math/cbrt.c
|
||||
libs/math/chbevl.c
|
||||
libs/math/clog.c
|
||||
libs/math/cmplx.c
|
||||
libs/math/const.c
|
||||
libs/math/cosh.c
|
||||
libs/math/drand.c
|
||||
libs/math/dtestvec.c
|
||||
libs/math/exp.c
|
||||
libs/math/exp10.c
|
||||
libs/math/exp2.c
|
||||
libs/math/fabs.c
|
||||
libs/math/floor.c
|
||||
libs/math/isnan.c
|
||||
libs/math/log.c
|
||||
libs/math/log10.c
|
||||
libs/math/log2.c
|
||||
libs/math/mconf.h
|
||||
libs/math/mod2pi.c
|
||||
libs/math/mtherr.c
|
||||
libs/math/mtst.c
|
||||
libs/math/polevl.c
|
||||
libs/math/pow.c
|
||||
libs/math/powi.c
|
||||
libs/math/protos.h
|
||||
libs/math/round.c
|
||||
libs/math/setprec.c
|
||||
libs/math/sin.c
|
||||
libs/math/sincos.c
|
||||
libs/math/sindg.c
|
||||
libs/math/sinh.c
|
||||
libs/math/sqrt.c
|
||||
libs/math/tan.c
|
||||
libs/math/tandg.c
|
||||
libs/math/tanh.c
|
||||
libs/math/unity.c
|
||||
libs/network/cc3000/board_spi.c
|
||||
libs/network/cc3000/board_spi.h
|
||||
libs/network/cc3000/cc3000_common.c
|
||||
libs/network/cc3000/cc3000_common.h
|
||||
libs/network/cc3000/evnt_handler.c
|
||||
libs/network/cc3000/evnt_handler.h
|
||||
libs/network/cc3000/hci.c
|
||||
libs/network/cc3000/hci.h
|
||||
libs/network/cc3000/host_driver_version.h
|
||||
libs/network/cc3000/jswrap_cc3000.c
|
||||
libs/network/cc3000/jswrap_cc3000.h
|
||||
libs/network/cc3000/netapp.c
|
||||
libs/network/cc3000/netapp.h
|
||||
libs/network/cc3000/network_cc3000.c
|
||||
libs/network/cc3000/network_cc3000.h
|
||||
libs/network/cc3000/nvmem.c
|
||||
libs/network/cc3000/nvmem.h
|
||||
libs/network/cc3000/security.c
|
||||
libs/network/cc3000/security.h
|
||||
libs/network/cc3000/socket.c
|
||||
libs/network/cc3000/socket.h
|
||||
libs/network/cc3000/spi.h
|
||||
libs/network/cc3000/wlan.c
|
||||
libs/network/cc3000/wlan.h
|
||||
libs/network/http/httpserver.c
|
||||
libs/network/http/httpserver.h
|
||||
libs/network/http/jswrap_http.c
|
||||
libs/network/http/jswrap_http.h
|
||||
libs/network/linux/network_linux.c
|
||||
libs/network/linux/network_linux.h
|
||||
libs/network/wiznet/DHCP/dhcp.c
|
||||
libs/network/wiznet/DHCP/dhcp.h
|
||||
libs/network/wiznet/DNS/dns.c
|
||||
libs/network/wiznet/DNS/dns.h
|
||||
libs/network/wiznet/DNS/dns_parse.c
|
||||
libs/network/wiznet/DNS/dns_parse.h
|
||||
libs/network/wiznet/Ethernet/socket.c
|
||||
libs/network/wiznet/Ethernet/socket.h
|
||||
libs/network/wiznet/Ethernet/wizchip_conf.c
|
||||
libs/network/wiznet/Ethernet/wizchip_conf.h
|
||||
libs/network/wiznet/W5500/w5500.c
|
||||
libs/network/wiznet/W5500/w5500.h
|
||||
libs/network/wiznet/jswrap_wiznet.c
|
||||
libs/network/wiznet/jswrap_wiznet.h
|
||||
libs/network/wiznet/network_wiznet.c
|
||||
libs/network/wiznet/network_wiznet.h
|
||||
libs/network/network.c
|
||||
libs/network/network.h
|
||||
libs/trigger/jswrap_trigger.c
|
||||
libs/trigger/jswrap_trigger.h
|
||||
libs/trigger/trigger.c
|
||||
libs/trigger/trigger.h
|
||||
libs/jswrap_fat.c
|
||||
libs/jswrap_fat.h
|
||||
libs/jswrap_fs.c
|
||||
libs/jswrap_fs.h
|
||||
libs/jswrap_math.c
|
||||
libs/jswrap_math.h
|
||||
src/jsdevices.c
|
||||
src/jsdevices.h
|
||||
src/jshardware.h
|
||||
src/jsinteractive.c
|
||||
src/jsinteractive.h
|
||||
src/jslex.c
|
||||
src/jslex.h
|
||||
src/jsnative.c
|
||||
src/jsnative.h
|
||||
src/jsparse.c
|
||||
src/jsparse.h
|
||||
src/jspin.c
|
||||
src/jspin.h
|
||||
src/jstimer.c
|
||||
src/jstimer.h
|
||||
src/jsutils.c
|
||||
src/jsutils.h
|
||||
src/jsvar.c
|
||||
src/jsvar.h
|
||||
src/jswrap_array.c
|
||||
src/jswrap_array.h
|
||||
src/jswrap_arraybuffer.c
|
||||
src/jswrap_arraybuffer.h
|
||||
src/jswrap_espruino.c
|
||||
src/jswrap_espruino.h
|
||||
src/jswrap_functions.c
|
||||
src/jswrap_functions.h
|
||||
src/jswrap_interactive.c
|
||||
src/jswrap_interactive.h
|
||||
src/jswrap_io.c
|
||||
src/jswrap_io.h
|
||||
src/jswrap_json.c
|
||||
src/jswrap_json.h
|
||||
src/jswrap_modules.c
|
||||
src/jswrap_modules.h
|
||||
src/jswrap_number.c
|
||||
src/jswrap_number.h
|
||||
src/jswrap_object.c
|
||||
src/jswrap_object.h
|
||||
src/jswrap_onewire.c
|
||||
src/jswrap_onewire.h
|
||||
src/jswrap_pin.c
|
||||
src/jswrap_pin.h
|
||||
src/jswrap_process.c
|
||||
src/jswrap_process.h
|
||||
src/jswrap_serial.c
|
||||
src/jswrap_serial.h
|
||||
src/jswrap_spi_i2c.c
|
||||
src/jswrap_spi_i2c.h
|
||||
src/jswrap_string.c
|
||||
src/jswrap_string.h
|
||||
src/jswrap_waveform.c
|
||||
src/jswrap_waveform.h
|
||||
src/jswrapper.h
|
||||
targetlibs/arm/arm_common_tables.h
|
||||
targetlibs/arm/arm_math.h
|
||||
targetlibs/arm/core_cm0.h
|
||||
targetlibs/arm/core_cm3.h
|
||||
targetlibs/arm/core_cm4.h
|
||||
targetlibs/arm/core_cm4_simd.h
|
||||
targetlibs/arm/core_cmFunc.h
|
||||
targetlibs/arm/core_cmInstr.h
|
||||
targetlibs/libmbed/KL25Z/cmsis.h
|
||||
targetlibs/libmbed/KL25Z/cmsis_nvic.h
|
||||
targetlibs/libmbed/KL25Z/core_cm0plus.h
|
||||
targetlibs/libmbed/KL25Z/core_cmFunc.h
|
||||
targetlibs/libmbed/KL25Z/core_cmInstr.h
|
||||
targetlibs/libmbed/KL25Z/device.h
|
||||
targetlibs/libmbed/KL25Z/gpio_object.h
|
||||
targetlibs/libmbed/KL25Z/MKL25Z4.h
|
||||
targetlibs/libmbed/KL25Z/objects.h
|
||||
targetlibs/libmbed/KL25Z/PeripheralNames.h
|
||||
targetlibs/libmbed/KL25Z/PinNames.h
|
||||
targetlibs/libmbed/KL25Z/PortNames.h
|
||||
targetlibs/libmbed/KL25Z/system_MKL25Z4.h
|
||||
targetlibs/libmbed/LPC11U24/cmsis.h
|
||||
targetlibs/libmbed/LPC11U24/cmsis_nvic.h
|
||||
targetlibs/libmbed/LPC11U24/core_cm0.h
|
||||
targetlibs/libmbed/LPC11U24/core_cmFunc.h
|
||||
targetlibs/libmbed/LPC11U24/core_cmInstr.h
|
||||
targetlibs/libmbed/LPC11U24/device.h
|
||||
targetlibs/libmbed/LPC11U24/gpio_object.h
|
||||
targetlibs/libmbed/LPC11U24/LPC11Uxx.h
|
||||
targetlibs/libmbed/LPC11U24/objects.h
|
||||
targetlibs/libmbed/LPC11U24/PeripheralNames.h
|
||||
targetlibs/libmbed/LPC11U24/PinNames.h
|
||||
targetlibs/libmbed/LPC11U24/PortNames.h
|
||||
targetlibs/libmbed/LPC11U24/power_api.h
|
||||
targetlibs/libmbed/LPC11U24/system_LPC11Uxx.h
|
||||
targetlibs/libmbed/LPC1768/cmsis.h
|
||||
targetlibs/libmbed/LPC1768/cmsis_nvic.h
|
||||
targetlibs/libmbed/LPC1768/core_cm3.h
|
||||
targetlibs/libmbed/LPC1768/core_cmFunc.h
|
||||
targetlibs/libmbed/LPC1768/core_cmInstr.h
|
||||
targetlibs/libmbed/LPC1768/device.h
|
||||
targetlibs/libmbed/LPC1768/gpio_object.h
|
||||
targetlibs/libmbed/LPC1768/LPC17xx.h
|
||||
targetlibs/libmbed/LPC1768/objects.h
|
||||
targetlibs/libmbed/LPC1768/PeripheralNames.h
|
||||
targetlibs/libmbed/LPC1768/PinNames.h
|
||||
targetlibs/libmbed/LPC1768/PortNames.h
|
||||
targetlibs/libmbed/LPC1768/system_LPC17xx.h
|
||||
targetlibs/libmbed/LPC2368/cmsis.h
|
||||
targetlibs/libmbed/LPC2368/cmsis_nvic.h
|
||||
targetlibs/libmbed/LPC2368/core_arm7.h
|
||||
targetlibs/libmbed/LPC2368/device.h
|
||||
targetlibs/libmbed/LPC2368/gpio_object.h
|
||||
targetlibs/libmbed/LPC2368/LPC23xx.h
|
||||
targetlibs/libmbed/LPC2368/objects.h
|
||||
targetlibs/libmbed/LPC2368/PeripheralNames.h
|
||||
targetlibs/libmbed/LPC2368/PinNames.h
|
||||
targetlibs/libmbed/LPC2368/PortNames.h
|
||||
targetlibs/libmbed/LPC2368/system_LPC23xx.h
|
||||
targetlibs/libmbed/LPC2368/vector_defns.h
|
||||
targetlibs/libmbed/LPC812/cmsis.h
|
||||
targetlibs/libmbed/LPC812/cmsis_nvic.h
|
||||
targetlibs/libmbed/LPC812/core_cm0plus.h
|
||||
targetlibs/libmbed/LPC812/core_cmFunc.h
|
||||
targetlibs/libmbed/LPC812/core_cmInstr.h
|
||||
targetlibs/libmbed/LPC812/device.h
|
||||
targetlibs/libmbed/LPC812/gpio_object.h
|
||||
targetlibs/libmbed/LPC812/LPC8xx.h
|
||||
targetlibs/libmbed/LPC812/objects.h
|
||||
targetlibs/libmbed/LPC812/PeripheralNames.h
|
||||
targetlibs/libmbed/LPC812/PinNames.h
|
||||
targetlibs/libmbed/LPC812/PortNames.h
|
||||
targetlibs/libmbed/LPC812/system_LPC8xx.h
|
||||
targetlibs/libmbed/AnalogIn.h
|
||||
targetlibs/libmbed/analogin_api.h
|
||||
targetlibs/libmbed/AnalogOut.h
|
||||
targetlibs/libmbed/analogout_api.h
|
||||
targetlibs/libmbed/BusIn.h
|
||||
targetlibs/libmbed/BusInOut.h
|
||||
targetlibs/libmbed/BusOut.h
|
||||
targetlibs/libmbed/CAN.h
|
||||
targetlibs/libmbed/can_api.h
|
||||
targetlibs/libmbed/can_helper.h
|
||||
targetlibs/libmbed/DigitalIn.h
|
||||
targetlibs/libmbed/DigitalInOut.h
|
||||
targetlibs/libmbed/DigitalOut.h
|
||||
targetlibs/libmbed/DirHandle.h
|
||||
targetlibs/libmbed/error.h
|
||||
targetlibs/libmbed/Ethernet.h
|
||||
targetlibs/libmbed/ethernet_api.h
|
||||
targetlibs/libmbed/FileBase.h
|
||||
targetlibs/libmbed/FileHandle.h
|
||||
targetlibs/libmbed/FileLike.h
|
||||
targetlibs/libmbed/FilePath.h
|
||||
targetlibs/libmbed/FileSystemLike.h
|
||||
targetlibs/libmbed/FunctionPointer.h
|
||||
targetlibs/libmbed/gpio_api.h
|
||||
targetlibs/libmbed/gpio_irq_api.h
|
||||
targetlibs/libmbed/I2C.h
|
||||
targetlibs/libmbed/i2c_api.h
|
||||
targetlibs/libmbed/I2CSlave.h
|
||||
targetlibs/libmbed/InterruptIn.h
|
||||
targetlibs/libmbed/LocalFileSystem.h
|
||||
targetlibs/libmbed/mbed.h
|
||||
targetlibs/libmbed/mbed_debug.h
|
||||
targetlibs/libmbed/mbed_interface.h
|
||||
targetlibs/libmbed/pinmap.h
|
||||
targetlibs/libmbed/platform.h
|
||||
targetlibs/libmbed/port_api.h
|
||||
targetlibs/libmbed/PortIn.h
|
||||
targetlibs/libmbed/PortInOut.h
|
||||
targetlibs/libmbed/PortOut.h
|
||||
targetlibs/libmbed/PwmOut.h
|
||||
targetlibs/libmbed/pwmout_api.h
|
||||
targetlibs/libmbed/rtc_api.h
|
||||
targetlibs/libmbed/rtc_time.h
|
||||
targetlibs/libmbed/semihost_api.h
|
||||
targetlibs/libmbed/Serial.h
|
||||
targetlibs/libmbed/serial_api.h
|
||||
targetlibs/libmbed/sleep_api.h
|
||||
targetlibs/libmbed/SPI.h
|
||||
targetlibs/libmbed/spi_api.h
|
||||
targetlibs/libmbed/SPISlave.h
|
||||
targetlibs/libmbed/Stream.h
|
||||
targetlibs/libmbed/Ticker.h
|
||||
targetlibs/libmbed/Timeout.h
|
||||
targetlibs/libmbed/Timer.h
|
||||
targetlibs/libmbed/TimerEvent.h
|
||||
targetlibs/libmbed/toolchain.h
|
||||
targetlibs/libmbed/us_ticker_api.h
|
||||
targetlibs/libmbed/wait_api.h
|
||||
targetlibs/stm32f1/lib/misc.c
|
||||
targetlibs/stm32f1/lib/misc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_adc.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_adc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_bkp.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_bkp.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_can.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_can.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_cec.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_cec.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_conf.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_crc.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_crc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_dac.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_dac.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_dbgmcu.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_dbgmcu.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_dma.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_dma.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_exti.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_exti.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_flash.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_flash.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_fsmc.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_fsmc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_gpio.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_gpio.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_i2c.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_i2c.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_iwdg.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_iwdg.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_pwr.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_pwr.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_rcc.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_rcc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_rtc.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_rtc.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_sdio.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_sdio.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_spi.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_spi.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_tim.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_tim.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_usart.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_usart.h
|
||||
targetlibs/stm32f1/lib/stm32f10x_wwdg.c
|
||||
targetlibs/stm32f1/lib/stm32f10x_wwdg.h
|
||||
targetlibs/stm32f1/lib/system_stm32f10x.c
|
||||
targetlibs/stm32f1/lib/system_stm32f10x.h
|
||||
targetlibs/stm32f1/usb/usb_conf.h
|
||||
targetlibs/stm32f1/usb/usb_desc.c
|
||||
targetlibs/stm32f1/usb/usb_desc.h
|
||||
targetlibs/stm32f1/usb/usb_endp.c
|
||||
targetlibs/stm32f1/usb/usb_istr.c
|
||||
targetlibs/stm32f1/usb/usb_istr.h
|
||||
targetlibs/stm32f1/usb/usb_prop.c
|
||||
targetlibs/stm32f1/usb/usb_prop.h
|
||||
targetlibs/stm32f1/usb/usb_pwr.c
|
||||
targetlibs/stm32f1/usb/usb_pwr.h
|
||||
targetlibs/stm32f1/usb/usb_utils.c
|
||||
targetlibs/stm32f1/usb/usb_utils.h
|
||||
targetlibs/stm32f1/usblib/otgd_fs_cal.c
|
||||
targetlibs/stm32f1/usblib/otgd_fs_cal.h
|
||||
targetlibs/stm32f1/usblib/otgd_fs_dev.c
|
||||
targetlibs/stm32f1/usblib/otgd_fs_dev.h
|
||||
targetlibs/stm32f1/usblib/otgd_fs_int.c
|
||||
targetlibs/stm32f1/usblib/otgd_fs_int.h
|
||||
targetlibs/stm32f1/usblib/otgd_fs_pcd.c
|
||||
targetlibs/stm32f1/usblib/otgd_fs_pcd.h
|
||||
targetlibs/stm32f1/usblib/otgd_fs_regs.h
|
||||
targetlibs/stm32f1/usblib/usb_core.c
|
||||
targetlibs/stm32f1/usblib/usb_core.h
|
||||
targetlibs/stm32f1/usblib/usb_def.h
|
||||
targetlibs/stm32f1/usblib/usb_init.c
|
||||
targetlibs/stm32f1/usblib/usb_init.h
|
||||
targetlibs/stm32f1/usblib/usb_int.c
|
||||
targetlibs/stm32f1/usblib/usb_int.h
|
||||
targetlibs/stm32f1/usblib/usb_lib.h
|
||||
targetlibs/stm32f1/usblib/usb_mem.c
|
||||
targetlibs/stm32f1/usblib/usb_mem.h
|
||||
targetlibs/stm32f1/usblib/usb_regs.c
|
||||
targetlibs/stm32f1/usblib/usb_regs.h
|
||||
targetlibs/stm32f1/usblib/usb_sil.c
|
||||
targetlibs/stm32f1/usblib/usb_sil.h
|
||||
targetlibs/stm32f1/usblib/usb_type.h
|
||||
targetlibs/stm32f2/lib/misc.c
|
||||
targetlibs/stm32f2/lib/misc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_adc.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_adc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_can.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_can.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_conf.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_crc.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_crc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_cryp.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_cryp.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_cryp_aes.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_cryp_des.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_cryp_tdes.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dac.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dac.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dbgmcu.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dbgmcu.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dcmi.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dcmi.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dma.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_dma.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_exti.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_exti.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_flash.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_flash.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_fsmc.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_fsmc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_gpio.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_gpio.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_hash.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_hash.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_hash_md5.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_hash_sha1.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_i2c.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_i2c.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_iwdg.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_iwdg.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_pwr.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_pwr.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rcc.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rcc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rng.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rng.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rtc.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_rtc.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_sdio.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_sdio.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_spi.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_spi.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_syscfg.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_syscfg.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_tim.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_tim.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_usart.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_usart.h
|
||||
targetlibs/stm32f2/lib/stm32f2xx_wwdg.c
|
||||
targetlibs/stm32f2/lib/stm32f2xx_wwdg.h
|
||||
targetlibs/stm32f2/lib/system_stm32f2xx.c
|
||||
targetlibs/stm32f2/lib/system_stm32f2xx.h
|
||||
targetlibs/stm32f2/usb/usb_bsp.c
|
||||
targetlibs/stm32f2/usb/usb_conf.h
|
||||
targetlibs/stm32f2/usb/usb_irq_handlers.c
|
||||
targetlibs/stm32f2/usb/usbd_cdc_vcp.c
|
||||
targetlibs/stm32f2/usb/usbd_conf.h
|
||||
targetlibs/stm32f2/usb/usbd_desc.c
|
||||
targetlibs/stm32f2/usb/usbd_desc.h
|
||||
targetlibs/stm32f2/usb/usbd_usr.c
|
||||
targetlibs/stm32f2/usblib/usb_bsp.h
|
||||
targetlibs/stm32f2/usblib/usb_bsp_template.c
|
||||
targetlibs/stm32f2/usblib/usb_conf_template.h
|
||||
targetlibs/stm32f2/usblib/usb_core.c
|
||||
targetlibs/stm32f2/usblib/usb_core.h
|
||||
targetlibs/stm32f2/usblib/usb_dcd.c
|
||||
targetlibs/stm32f2/usblib/usb_dcd.h
|
||||
targetlibs/stm32f2/usblib/usb_dcd_int.c
|
||||
targetlibs/stm32f2/usblib/usb_dcd_int.h
|
||||
targetlibs/stm32f2/usblib/usb_defines.h
|
||||
targetlibs/stm32f2/usblib/usb_hcd.c
|
||||
targetlibs/stm32f2/usblib/usb_hcd.h
|
||||
targetlibs/stm32f2/usblib/usb_hcd_int.c
|
||||
targetlibs/stm32f2/usblib/usb_hcd_int.h
|
||||
targetlibs/stm32f2/usblib/usb_otg.c
|
||||
targetlibs/stm32f2/usblib/usb_otg.h
|
||||
targetlibs/stm32f2/usblib/usb_regs.h
|
||||
targetlibs/stm32f2/usblib/usbd_cdc_core.c
|
||||
targetlibs/stm32f2/usblib/usbd_cdc_core.h
|
||||
targetlibs/stm32f2/usblib/usbd_cdc_if_template.c
|
||||
targetlibs/stm32f2/usblib/usbd_cdc_if_template.h
|
||||
targetlibs/stm32f2/usblib/usbd_conf_template.h
|
||||
targetlibs/stm32f2/usblib/usbd_core.c
|
||||
targetlibs/stm32f2/usblib/usbd_core.h
|
||||
targetlibs/stm32f2/usblib/usbd_def.h
|
||||
targetlibs/stm32f2/usblib/usbd_ioreq.c
|
||||
targetlibs/stm32f2/usblib/usbd_ioreq.h
|
||||
targetlibs/stm32f2/usblib/usbd_req.c
|
||||
targetlibs/stm32f2/usblib/usbd_req.h
|
||||
targetlibs/stm32f2/usblib/usbd_usr.h
|
||||
targetlibs/stm32f3/lib/stm32f30x.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_adc.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_adc.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_can.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_can.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_comp.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_comp.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_conf.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_crc.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_crc.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_dac.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_dac.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_dbgmcu.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_dbgmcu.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_dma.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_dma.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_exti.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_exti.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_flash.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_flash.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_gpio.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_gpio.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_i2c.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_i2c.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_iwdg.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_iwdg.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_misc.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_misc.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_opamp.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_opamp.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_pwr.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_pwr.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_rcc.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_rcc.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_rtc.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_rtc.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_spi.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_spi.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_syscfg.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_syscfg.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_tim.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_tim.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_usart.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_usart.h
|
||||
targetlibs/stm32f3/lib/stm32f30x_wwdg.c
|
||||
targetlibs/stm32f3/lib/stm32f30x_wwdg.h
|
||||
targetlibs/stm32f3/lib/system_stm32f30x.c
|
||||
targetlibs/stm32f3/lib/system_stm32f30x.h
|
||||
targetlibs/stm32f3/usb/usb_conf.h
|
||||
targetlibs/stm32f3/usb/usb_desc.c
|
||||
targetlibs/stm32f3/usb/usb_desc.h
|
||||
targetlibs/stm32f3/usb/usb_endp.c
|
||||
targetlibs/stm32f3/usb/usb_istr.c
|
||||
targetlibs/stm32f3/usb/usb_istr.h
|
||||
targetlibs/stm32f3/usb/usb_prop.c
|
||||
targetlibs/stm32f3/usb/usb_prop.h
|
||||
targetlibs/stm32f3/usb/usb_pwr.c
|
||||
targetlibs/stm32f3/usb/usb_pwr.h
|
||||
targetlibs/stm32f3/usb/usb_utils.c
|
||||
targetlibs/stm32f3/usb/usb_utils.h
|
||||
targetlibs/stm32f3/usblib/usb_core.c
|
||||
targetlibs/stm32f3/usblib/usb_core.h
|
||||
targetlibs/stm32f3/usblib/usb_def.h
|
||||
targetlibs/stm32f3/usblib/usb_init.c
|
||||
targetlibs/stm32f3/usblib/usb_init.h
|
||||
targetlibs/stm32f3/usblib/usb_int.c
|
||||
targetlibs/stm32f3/usblib/usb_int.h
|
||||
targetlibs/stm32f3/usblib/usb_lib.h
|
||||
targetlibs/stm32f3/usblib/usb_mem.c
|
||||
targetlibs/stm32f3/usblib/usb_mem.h
|
||||
targetlibs/stm32f3/usblib/usb_regs.c
|
||||
targetlibs/stm32f3/usblib/usb_regs.h
|
||||
targetlibs/stm32f3/usblib/usb_sil.c
|
||||
targetlibs/stm32f3/usblib/usb_sil.h
|
||||
targetlibs/stm32f3/usblib/usb_type.h
|
||||
targetlibs/stm32f4/lib/misc.c
|
||||
targetlibs/stm32f4/lib/misc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_adc.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_adc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_can.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_can.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_conf.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_crc.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_crc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_cryp.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_cryp.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_cryp_aes.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_cryp_des.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_cryp_tdes.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dac.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dac.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dbgmcu.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dbgmcu.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dcmi.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dcmi.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dma.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_dma.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_exti.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_exti.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_flash.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_flash.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_fsmc.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_fsmc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_gpio.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_gpio.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_hash.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_hash.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_hash_md5.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_hash_sha1.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_i2c.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_i2c.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_iwdg.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_iwdg.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_pwr.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_pwr.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rcc.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rcc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rng.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rng.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rtc.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_rtc.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_sdio.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_sdio.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_spi.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_spi.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_syscfg.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_syscfg.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_tim.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_tim.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_usart.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_usart.h
|
||||
targetlibs/stm32f4/lib/stm32f4xx_wwdg.c
|
||||
targetlibs/stm32f4/lib/stm32f4xx_wwdg.h
|
||||
targetlibs/stm32f4/lib/system_stm32f4xx.c
|
||||
targetlibs/stm32f4/lib/system_stm32f4xx.h
|
||||
targetlibs/stm32f4/usb/usb_bsp.c
|
||||
targetlibs/stm32f4/usb/usb_conf.h
|
||||
targetlibs/stm32f4/usb/usbd_cdc_vcp.c
|
||||
targetlibs/stm32f4/usb/usbd_cdc_vcp.h
|
||||
targetlibs/stm32f4/usb/usbd_conf.h
|
||||
targetlibs/stm32f4/usb/usbd_desc.c
|
||||
targetlibs/stm32f4/usb/usbd_desc.h
|
||||
targetlibs/stm32f4/usb/usbd_usr.c
|
||||
targetlibs/stm32f4/usblib/usb_bsp.h
|
||||
targetlibs/stm32f4/usblib/usb_conf_template.h
|
||||
targetlibs/stm32f4/usblib/usb_core.c
|
||||
targetlibs/stm32f4/usblib/usb_core.h
|
||||
targetlibs/stm32f4/usblib/usb_dcd.c
|
||||
targetlibs/stm32f4/usblib/usb_dcd.h
|
||||
targetlibs/stm32f4/usblib/usb_dcd_int.c
|
||||
targetlibs/stm32f4/usblib/usb_dcd_int.h
|
||||
targetlibs/stm32f4/usblib/usb_defines.h
|
||||
targetlibs/stm32f4/usblib/usb_hcd.c
|
||||
targetlibs/stm32f4/usblib/usb_hcd.h
|
||||
targetlibs/stm32f4/usblib/usb_hcd_int.c
|
||||
targetlibs/stm32f4/usblib/usb_hcd_int.h
|
||||
targetlibs/stm32f4/usblib/usb_otg.c
|
||||
targetlibs/stm32f4/usblib/usb_otg.h
|
||||
targetlibs/stm32f4/usblib/usb_regs.h
|
||||
targetlibs/stm32f4/usblib/usbd_cdc_core.c
|
||||
targetlibs/stm32f4/usblib/usbd_cdc_core.h
|
||||
targetlibs/stm32f4/usblib/usbd_cdc_if_template.h
|
||||
targetlibs/stm32f4/usblib/usbd_conf_template.h
|
||||
targetlibs/stm32f4/usblib/usbd_core.c
|
||||
targetlibs/stm32f4/usblib/usbd_core.h
|
||||
targetlibs/stm32f4/usblib/usbd_def.h
|
||||
targetlibs/stm32f4/usblib/usbd_ioreq.c
|
||||
targetlibs/stm32f4/usblib/usbd_ioreq.h
|
||||
targetlibs/stm32f4/usblib/usbd_req.c
|
||||
targetlibs/stm32f4/usblib/usbd_req.h
|
||||
targetlibs/stm32f4/usblib/usbd_usr.h
|
||||
targetlibs/stm32l1/lib/misc.c
|
||||
targetlibs/stm32l1/lib/misc.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_adc.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_adc.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_comp.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_comp.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_crc.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_crc.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dac.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dac.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dbgmcu.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dbgmcu.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dma.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_dma.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_exti.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_exti.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_flash.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_flash.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_flash_ramfunc.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_gpio.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_gpio.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_i2c.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_i2c.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_iwdg.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_iwdg.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_lcd.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_lcd.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_pwr.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_pwr.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_rcc.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_rcc.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_rtc.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_rtc.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_spi.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_spi.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_syscfg.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_syscfg.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_tim.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_tim.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_usart.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_usart.h
|
||||
targetlibs/stm32l1/lib/stm32l1xx_wwdg.c
|
||||
targetlibs/stm32l1/lib/stm32l1xx_wwdg.h
|
||||
targets/arduino/Espruino.cpp
|
||||
targets/arduino/Espruino.h
|
||||
targets/arduino/jshardware.cpp
|
||||
targets/arduino/jswrapper.c
|
||||
targets/arduino/platform_config.h
|
||||
targets/linux/jshardware.c
|
||||
targets/linux/main.c
|
||||
targets/mbed/jshardware.cpp
|
||||
targets/mbed/main.c
|
||||
targets/stm32/jshardware.c
|
||||
targets/stm32/main.c
|
||||
targets/stm32/stm32_it.c
|
||||
targets/stm32/stm32_it.h
|
||||
targets/stm32_boot/main.c
|
||||
targets/stm32_boot/utils.c
|
||||
targets/stm32_boot/utils.h
|
||||
Makefile
|
||||
39
Espruino.includes
Normal file
39
Espruino.includes
Normal file
@ -0,0 +1,39 @@
|
||||
code/extra
|
||||
libs
|
||||
libs/fat_sd
|
||||
libs/graphics
|
||||
libs/math
|
||||
libs/network
|
||||
libs/network/cc3000
|
||||
libs/network/http
|
||||
libs/network/linux
|
||||
libs/network/wiznet
|
||||
libs/network/wiznet/DHCP
|
||||
libs/network/wiznet/DNS
|
||||
libs/network/wiznet/Ethernet
|
||||
libs/network/wiznet/W5500
|
||||
libs/trigger
|
||||
src
|
||||
targetlibs/arm
|
||||
targetlibs/libmbed
|
||||
targetlibs/libmbed/KL25Z
|
||||
targetlibs/libmbed/LPC11U24
|
||||
targetlibs/libmbed/LPC1768
|
||||
targetlibs/libmbed/LPC2368
|
||||
targetlibs/libmbed/LPC812
|
||||
targetlibs/stm32f1/lib
|
||||
targetlibs/stm32f1/usb
|
||||
targetlibs/stm32f1/usblib
|
||||
targetlibs/stm32f2/lib
|
||||
targetlibs/stm32f2/usb
|
||||
targetlibs/stm32f2/usblib
|
||||
targetlibs/stm32f3/lib
|
||||
targetlibs/stm32f3/usb
|
||||
targetlibs/stm32f3/usblib
|
||||
targetlibs/stm32f4/lib
|
||||
targetlibs/stm32f4/usb
|
||||
targetlibs/stm32f4/usblib
|
||||
targetlibs/stm32l1/lib
|
||||
targets/arduino
|
||||
targets/stm32
|
||||
targets/stm32_boot
|
||||
27
Makefile
27
Makefile
@ -38,7 +38,6 @@
|
||||
# BOOTLOADER=1 # make the bootloader (not Espruino)
|
||||
# PROFILE=1 # Compile with gprof profiling info
|
||||
# WIZNET=1 # If compiling for a non-linux target that has internet support, use WIZnet support, not TI CC3000
|
||||
|
||||
ifndef SINGLETHREAD
|
||||
MAKEFLAGS=-j5 # multicore
|
||||
endif
|
||||
@ -87,6 +86,7 @@ BASEADDRESS=0x08000000
|
||||
###################################################
|
||||
# When adding stuff here, also remember build_pininfo, platform_config.h, jshardware.c
|
||||
ifdef ESPRUINO_1V0
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
#USE_NET=1
|
||||
USE_GRAPHICS=1
|
||||
@ -99,6 +99,7 @@ STLIB=STM32F10X_XL
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef ESPRUINO_1V1
|
||||
EMBEDDED=1
|
||||
DEFINES+=-DESPRUINO_1V1
|
||||
USE_BOOTLOADER=1
|
||||
BOOTLOADER_PROJ_NAME=bootloader_espruino_1v1
|
||||
@ -114,6 +115,7 @@ STLIB=STM32F10X_XL
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o
|
||||
OPTIMIZEFLAGS+=-Os # not that short on memory, but Travis compiler is old and uses more
|
||||
else ifdef ESPRUINO_1V3
|
||||
EMBEDDED=1
|
||||
DEFINES+=-DESPRUINO_1V3
|
||||
USE_BOOTLOADER=1
|
||||
BOOTLOADER_PROJ_NAME=bootloader_espruino_1v3
|
||||
@ -128,6 +130,7 @@ STLIB=STM32F10X_XL
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef OLIMEXINO_STM32
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_FILESYSTEM=1
|
||||
FAMILY=STM32F1
|
||||
@ -138,6 +141,7 @@ STLIB=STM32F10X_MD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
|
||||
OPTIMIZEFLAGS+=-Os # short on program memory
|
||||
else ifdef OLIMEXINO_STM32_BOOTLOADER
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_FILESYSTEM=1
|
||||
FAMILY=STM32F1
|
||||
@ -149,6 +153,7 @@ STLIB=STM32F10X_MD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
|
||||
OPTIMIZEFLAGS+=-Os # short on program memory
|
||||
else ifdef EMBEDDED_PI
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
# USE_FILESYSTEM=1 # no SD-CARD READER
|
||||
FAMILY=STM32F1
|
||||
@ -158,6 +163,7 @@ STLIB=STM32F10X_MD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
|
||||
OPTIMIZEFLAGS+=-Os # short on program memory
|
||||
else ifdef HYSTM32_24
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_GRAPHICS=1
|
||||
USE_LCD_FSMC=1
|
||||
@ -170,6 +176,7 @@ STLIB=STM32F10X_HD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef HYSTM32_28
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_GRAPHICS=1
|
||||
USE_LCD_FSMC=1
|
||||
@ -183,6 +190,7 @@ STLIB=STM32F10X_MD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
|
||||
OPTIMIZEFLAGS+=-Os
|
||||
else ifdef HYSTM32_32
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_GRAPHICS=1
|
||||
USE_LCD_FSMC=1
|
||||
@ -195,6 +203,7 @@ STLIB=STM32F10X_HD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef STM32F4DISCOVERY
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
USE_NET=1
|
||||
USE_GRAPHICS=1
|
||||
@ -206,6 +215,7 @@ STLIB=STM32F4XX
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f4/lib/startup_stm32f4xx.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef STM32F429IDISCOVERY
|
||||
EMBEDDED=1
|
||||
#USB=1
|
||||
USE_GRAPHICS=1
|
||||
DEFINES += -DUSE_USB_OTG_FS=1
|
||||
@ -216,6 +226,7 @@ STLIB=STM32F4XX
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f4/lib/startup_stm32f4xx.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef SMARTWATCH
|
||||
EMBEDDED=1
|
||||
DEFINES+=-DHSE_VALUE=26000000UL
|
||||
USB=1
|
||||
FAMILY=STM32F2
|
||||
@ -225,6 +236,7 @@ STLIB=STM32F2XX
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f2/lib/startup_stm32f2xx.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef STM32F3DISCOVERY
|
||||
EMBEDDED=1
|
||||
#USE_BOOTLOADER=1
|
||||
#BOOTLOADER_PROJ_NAME=bootloader_espruino_stm32f3discovery
|
||||
USB=1
|
||||
@ -235,6 +247,7 @@ STLIB=STM32F3XX
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f3/lib/startup_stm32f30x.o
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef STM32VLDISCOVERY
|
||||
EMBEDDED=1
|
||||
FAMILY=STM32F1
|
||||
CHIP=STM32F100RB
|
||||
BOARD=STM32VLDISCOVERY
|
||||
@ -242,6 +255,7 @@ STLIB=STM32F10X_MD_VL
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md_vl.o
|
||||
OPTIMIZEFLAGS+=-Os # short on program memory
|
||||
else ifdef TINYCHIP
|
||||
EMBEDDED=1
|
||||
FAMILY=STM32F1
|
||||
CHIP=STM32F103TB
|
||||
BOARD=TINYCHIP
|
||||
@ -249,6 +263,7 @@ STLIB=STM32F10X_MD
|
||||
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
|
||||
OPTIMIZEFLAGS+=-Os # short on program memory
|
||||
else ifdef LPC1768
|
||||
EMBEDDED=1
|
||||
MBED=1
|
||||
FAMILY=LPC1768
|
||||
CHIP=LPC1768
|
||||
@ -258,6 +273,7 @@ PRECOMPILED_OBJS+=$(MBED_GCC_CS_DIR)/sys.o $(MBED_GCC_CS_DIR)/cmsis_nvic.o $(MBE
|
||||
LIBS+=-L$(MBED_GCC_CS_DIR) -lmbed
|
||||
OPTIMIZEFLAGS+=-O3
|
||||
else ifdef CARAMBOLA
|
||||
EMBEDDED=1
|
||||
BOARD=CARAMBOLA
|
||||
DEFINES += -DCARAMBOLA -DSYSFS_GPIO_DIR="\"/sys/class/gpio\""
|
||||
LINUX=1
|
||||
@ -266,6 +282,7 @@ USB=1
|
||||
USE_GRAPHICS=1
|
||||
USE_NET=1
|
||||
else ifdef RASPBERRYPI
|
||||
EMBEDDED=1
|
||||
BOARD=RASPBERRYPI
|
||||
DEFINES += -DRASPBERRYPI -DSYSFS_GPIO_DIR="\"/sys/class/gpio\""
|
||||
LINUX=1
|
||||
@ -275,6 +292,7 @@ USE_GRAPHICS=1
|
||||
#USE_LCD_SDL=1
|
||||
USE_NET=1
|
||||
else ifdef LCTECH_STM32F103RBT6
|
||||
EMBEDDED=1
|
||||
USB=1
|
||||
SAVE_ON_FLASH=1
|
||||
FAMILY=STM32F1
|
||||
@ -383,7 +401,7 @@ else # !BOOTLOADER but using a bootloader
|
||||
ifdef USE_BOOTLOADER
|
||||
BUILD_LINKER_FLAGS+=--using_bootloader
|
||||
# -k applies bootloader hack for Espruino 1v3 boards
|
||||
STM32LOADER_FLAGS+=-k -p /dev/ttyACM0
|
||||
STM32LOADER_FLAGS+=-k -p /dev/tty.usbmodemfa131
|
||||
BASEADDRESS=$(shell python -c "import sys;sys.path.append('scripts');import common;print hex(0x08000000+common.get_bootloader_size())")
|
||||
endif
|
||||
endif
|
||||
@ -399,6 +417,7 @@ endif
|
||||
ifdef USE_FILESYSTEM
|
||||
DEFINES += -DUSE_FILESYSTEM
|
||||
WRAPPERSOURCES += libs/jswrap_fat.c
|
||||
WRAPPERSOURCES += libs/jswrap_fs.c
|
||||
ifndef LINUX
|
||||
INCLUDE += -I$(ROOT)/libs/fat_sd
|
||||
SOURCES += \
|
||||
@ -873,6 +892,8 @@ CFLAGS += $(OPTIMIZEFLAGS) -c $(ARCHFLAGS) $(DEFINES) $(INCLUDE)
|
||||
LDFLAGS += $(OPTIMIZEFLAGS) $(ARCHFLAGS)
|
||||
ifndef MACOSX
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
else ifdef EMBEDDED
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
endif
|
||||
|
||||
ifdef LINKER_FILE
|
||||
@ -988,7 +1009,7 @@ ifdef MBED
|
||||
cp $(PROJ_NAME).bin /media/MBED;sync
|
||||
else
|
||||
echo ST-LINK flash
|
||||
~/bin/st-flash write $(PROJ_NAME).bin $(BASEADDRESS)
|
||||
st-flash write $(PROJ_NAME).bin $(BASEADDRESS)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ void jsfsReportError(const char *msg, FRESULT res) {
|
||||
|
||||
bool fat_initialised = false;
|
||||
|
||||
static bool jsfsInit() {
|
||||
bool jsfsInit() {
|
||||
#ifndef LINUX
|
||||
if (!fat_initialised) {
|
||||
FRESULT res;
|
||||
|
||||
543
libs/jswrap_fs.c
Normal file
543
libs/jswrap_fs.c
Normal file
@ -0,0 +1,543 @@
|
||||
/*
|
||||
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
|
||||
*
|
||||
* Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
* This file is designed to be parsed during the build process
|
||||
*
|
||||
* Contains built-in functions for SD card access
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
#include "jswrap_fs.h"
|
||||
|
||||
/*JSON{ "type":"library",
|
||||
"class" : "fs",
|
||||
"description" : ["This library handles interfacing with a FAT32 filesystem on an SD card. The API is designed to be similar to node.js's - However Espruino does not currently support asynchronous file IO, so the functions behave like node.js's xxxxSync functions. Versions of the functions with 'Sync' after them are also provided for compatibility.",
|
||||
"Currently this provides minimal file IO - it's great for logging and loading/saving settings, but not good for loading large amounts of data as you will soon fill your memory up.",
|
||||
"It is currently only available on boards that contain an SD card slot, such as the Olimexino and the HY. It can not currently be added to boards that did not ship with a card slot.",
|
||||
"To use this, you must type ```var fs = require('fs')``` to get access to the library" ]
|
||||
}*/
|
||||
|
||||
/*JSON{ "type":"library",
|
||||
"class" : "File",
|
||||
"description" : ["This is the stream related file IO library.",
|
||||
"To use this, you must type ```var fd = require('fs').open('filepath','flags','mode')``` to open a file stream." ]
|
||||
}*/
|
||||
|
||||
/*JSON{ "type":"library",
|
||||
"class" : "Pipe",
|
||||
"description" : ["This is the Pipe container for async related file IO library." ]
|
||||
}*/
|
||||
|
||||
JsVar* fsGetArray(const char *name, bool create)
|
||||
{
|
||||
JsVar *arrayName = jsvFindChildFromString(execInfo.root, name, create);
|
||||
JsVar *arr = jsvSkipName(arrayName);
|
||||
if (!arr && create) {
|
||||
arr = jsvNewWithFlags(JSV_ARRAY);
|
||||
jsvSetValueOfName(arrayName, arr);
|
||||
}
|
||||
jsvUnLock(arrayName);
|
||||
return arr;
|
||||
}
|
||||
|
||||
/*JSON{ "type":"idle", "generate" : "jswrap_fs_idle" }*/
|
||||
bool jswrap_fs_idle()
|
||||
{
|
||||
bool ret = false;
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenPipes",false);
|
||||
if (arr)
|
||||
{
|
||||
JsvArrayIterator it;
|
||||
jsvArrayIteratorNew(&it, arr);
|
||||
while (jsvArrayIteratorHasElement(&it))
|
||||
{
|
||||
JsVar *pipe = jsvArrayIteratorGetElement(&it);
|
||||
JsVar *position = jsvObjectGetChild(pipe,"Position",0);
|
||||
JsVar *chunkSize = jsvObjectGetChild(pipe,"ChunkSize",0);
|
||||
JsVar *source = jsvObjectGetChild(pipe,"Source",0);
|
||||
JsVar *destination = jsvObjectGetChild(pipe,"Destination",0);
|
||||
if(!_Pipe(source, destination, chunkSize, position)) // when no more chunks are possible, execute the callback.
|
||||
{
|
||||
jsiQueueObjectCallbacks(pipe, "#oncomplete", pipe, 0);
|
||||
JsVar *idx = jsvArrayIteratorGetIndex(&it);
|
||||
jsvRemoveChild(arr,idx);
|
||||
jsvUnLock(idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = true;
|
||||
}
|
||||
jsvUnLock(source);
|
||||
jsvUnLock(destination);
|
||||
jsvUnLock(pipe);
|
||||
jsvUnLock(chunkSize);
|
||||
jsvUnLock(position);
|
||||
jsvArrayIteratorNext(&it);
|
||||
}
|
||||
jsvArrayIteratorFree(&it);
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool _Pipe(JsVar* source, JsVar* destination, JsVar* chunkSize, JsVar* position)
|
||||
{
|
||||
bool InProgress = true;
|
||||
if(jsfsInit() && source && destination && chunkSize && position)
|
||||
{
|
||||
JsFile sourceFile;
|
||||
JsFile destinationFile;
|
||||
JsVar * Buffer;
|
||||
FRESULT res;
|
||||
if(fileGetFromVar(&sourceFile, source) && fileGetFromVar(&destinationFile, destination))
|
||||
{
|
||||
size_t ReadLength = jsvGetInteger(chunkSize);
|
||||
size_t Position = jsvGetInteger(position);
|
||||
Buffer = jsvNewStringOfLength(0);
|
||||
if(Buffer) // do we have enough memory?
|
||||
{
|
||||
size_t BytesRead = sourceFile.read(&sourceFile, Buffer, ReadLength, Position, &res);
|
||||
if(res == FR_OK && BytesRead > 0)
|
||||
{
|
||||
destinationFile.write(&destinationFile, Buffer, BytesRead, Position, &res);
|
||||
jsvSetInteger(position, (Position+BytesRead));
|
||||
}
|
||||
else
|
||||
{
|
||||
InProgress = false;
|
||||
}
|
||||
jsvUnLock(Buffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
InProgress = false;
|
||||
}
|
||||
}
|
||||
return InProgress;
|
||||
}
|
||||
|
||||
|
||||
/*JSON{ "type":"init", "generate" : "jswrap_fs_init" }*/
|
||||
void jswrap_fs_init() {
|
||||
|
||||
}
|
||||
|
||||
/*JSON{ "type":"kill", "generate" : "jswrap_fs_kill" }*/
|
||||
void jswrap_fs_kill() {
|
||||
{
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenFiles",false);
|
||||
if (arr) {
|
||||
JsvArrayIterator it;
|
||||
jsvArrayIteratorNew(&it, arr);
|
||||
while (jsvArrayIteratorHasElement(&it)) {
|
||||
JsVar *file = jsvArrayIteratorGetElement(&it);
|
||||
wrap_fat_close(file);
|
||||
jsvUnLock(file);
|
||||
jsvArrayIteratorNext(&it);
|
||||
}
|
||||
jsvArrayIteratorFree(&it);
|
||||
jsvRemoveAllChildren(arr);
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
}
|
||||
// all open files will have been closed..
|
||||
// now remove all pipes...
|
||||
{
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenPipes", false);
|
||||
if (arr) {
|
||||
jsvRemoveAllChildren(arr);
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool fileGetFromVar(JsFile *file, JsVar *parent)
|
||||
{
|
||||
bool ret = false;
|
||||
JsVar *fHandle = jsvObjectGetChild(parent, JS_HIDDEN_CHAR_STR"FShandle", 0);
|
||||
assert(fHandle);
|
||||
if (fHandle)
|
||||
{
|
||||
jsvGetString(fHandle, (char*)&file->data, sizeof(JsFileData)+1/*trailing zero*/);
|
||||
jsvUnLock(fHandle);
|
||||
file->fileVar = parent;
|
||||
file->read = _readFile;
|
||||
file->write = _writeFile;
|
||||
file->close = _closeFile;
|
||||
if(file->data.state == FS_OPEN) // return false if the file has been closed.
|
||||
{
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fileSetVar(JsFile *file)
|
||||
{
|
||||
JsVar *fHandle = jsvFindChildFromString(file->fileVar, JS_HIDDEN_CHAR_STR"FShandle", true);
|
||||
JsVar *data = jsvSkipName(fHandle);
|
||||
if (!data)
|
||||
{
|
||||
data = jsvNewStringOfLength(sizeof(JsFileData));
|
||||
jsvSetValueOfName(fHandle, data);
|
||||
}
|
||||
jsvUnLock(fHandle);
|
||||
assert(data);
|
||||
jsvSetString(data, (char*)&file->data, sizeof(JsFileData));
|
||||
jsvUnLock(data);
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "staticmethod", "class" : "fs", "name" : "open",
|
||||
"generate_full" : "wrap_fat_open(path, mode)",
|
||||
"description" : [ "Open a file."],
|
||||
"params" : [ [ "path", "JsVar", "the path to the file to open." ],
|
||||
[ "mode", "JsVar", "The mode to use when opening the file. Valid values for mode are 'r' for read and 'w' for write"] ],
|
||||
"return" : [ "JsVar", "The file handle or undefined if the file specified does not exist." ]
|
||||
}*/
|
||||
//fs.open(path, mode, callback)
|
||||
JsVar* wrap_fat_open(JsVar* path, JsVar* mode)
|
||||
{
|
||||
FRESULT res = FR_INVALID_NAME;
|
||||
JsFile file;
|
||||
FileMode fMode = FM_NONE;
|
||||
if (jsfsInit())
|
||||
{
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenFiles", true);
|
||||
if (!arr) return 0; // out of memory
|
||||
|
||||
char pathStr[JS_DIR_BUF_SIZE] = "";
|
||||
char modeStr[3] = "";
|
||||
if (!jsvIsUndefined(path) && !jsvIsUndefined(mode))
|
||||
{
|
||||
jsvGetString(path, pathStr, JS_DIR_BUF_SIZE);
|
||||
jsvGetString(mode, modeStr, 3);
|
||||
|
||||
if(strcmp(modeStr,"r") == 0)
|
||||
{
|
||||
fMode = FM_READ;
|
||||
}
|
||||
else if(strcmp(modeStr,"w") == 0)
|
||||
{
|
||||
fMode = FM_WRITE;
|
||||
}
|
||||
else if(strcmp(modeStr,"w+") == 0 || strcmp(modeStr,"r+") == 0)
|
||||
{
|
||||
fMode = FM_READ_WRITE;
|
||||
}
|
||||
if(fMode != FM_NONE && AllocateJsFile(&file, fMode, FT_FILE))
|
||||
{
|
||||
#ifndef LINUX
|
||||
if ((res=f_open(&file.data.handle, pathStr, fMode)) == FR_OK)
|
||||
{
|
||||
#else
|
||||
file.data.handle = fopen(pathStr, modeStr);
|
||||
if (file.data.handle)
|
||||
{
|
||||
res=FR_OK;
|
||||
#endif
|
||||
file.data.state = FS_OPEN;
|
||||
fileSetVar(&file);
|
||||
// add to list of open files
|
||||
jsvArrayPush(arr, file.fileVar);
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(res != FR_OK)
|
||||
{
|
||||
jsfsReportError("Could not open file", res);
|
||||
}
|
||||
|
||||
return file.fileVar;
|
||||
}
|
||||
|
||||
bool AllocateJsFile(JsFile* file,FileMode mode, FileType type)
|
||||
{
|
||||
bool ret = false;
|
||||
JsVar *parent = jspNewObject(0, "File");
|
||||
if (parent) // low memory
|
||||
{
|
||||
file->fileVar = parent;
|
||||
file->data.mode = mode;
|
||||
file->data.type = type;
|
||||
file->data.state = FS_NONE;
|
||||
file->read = _readFile;
|
||||
file->write = _writeFile;
|
||||
file->close = _closeFile;
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "method", "class" : "File", "name" : "pipe",
|
||||
"generate" : "wrap_fat_pipe",
|
||||
"params" : [ ["destfd", "JsVar", "The destination file/stream that will receive this files contents."],
|
||||
["chunkSize", "JsVar", "The amount of data to pipe from source to destination at a time."],
|
||||
["callback", "JsVar", "a function to call when the pipe activity is complete."] ],
|
||||
"return" : [ "JsVar", "The source file handle, for chaining multiple pipe actions." ]
|
||||
}*/
|
||||
JsVar * wrap_fat_pipe(JsVar* parent, JsVar* destfd, JsVar* ChunkSize, JsVar* callback)
|
||||
{
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenPipes", true);
|
||||
if (arr) // out of memory?
|
||||
{
|
||||
if (parent && destfd && ChunkSize)
|
||||
{
|
||||
JsVar *pipe = jspNewObject(0, "Pipe");
|
||||
if(pipe)// out of memory?
|
||||
{
|
||||
if(callback)
|
||||
{
|
||||
jsvAddNamedChild(pipe, callback, "#oncomplete");
|
||||
}
|
||||
jsvArrayPush(arr, pipe);
|
||||
JsVar* Position = jsvNewFromInteger(0);
|
||||
if(Position)
|
||||
{
|
||||
jsvUnLock(jsvAddNamedChild(pipe, Position, "Position"));
|
||||
jsvUnLock(jsvAddNamedChild(pipe, ChunkSize, "ChunkSize"));
|
||||
jsvUnLock(jsvAddNamedChild(pipe, parent, "Source"));
|
||||
jsvUnLock(jsvAddNamedChild(pipe, destfd, "Destination"));
|
||||
jsvUnLock(Position);
|
||||
}
|
||||
jsvUnLock(pipe);
|
||||
}
|
||||
}
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
jsvLockAgain(parent);
|
||||
return parent;
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "method", "class" : "File", "name" : "close",
|
||||
"generate_full" : "wrap_fat_close(parent)",
|
||||
"description" : [ "Close an open file."]
|
||||
}*/
|
||||
//fs.close(fd)
|
||||
void wrap_fat_close(JsVar* parent)
|
||||
{
|
||||
if (jsfsInit())
|
||||
{
|
||||
JsFile file;
|
||||
if (fileGetFromVar(&file, parent) && file.data.state == FS_OPEN)
|
||||
{
|
||||
file.close(&file);
|
||||
JsVar *arr = fsGetArray(JS_HIDDEN_CHAR_STR"FSOpenFiles", false);
|
||||
if (arr)
|
||||
{
|
||||
JsVar *idx = jsvGetArrayIndexOf(arr, file.fileVar, true);
|
||||
if (idx)
|
||||
{
|
||||
jsvRemoveChild(arr, idx);
|
||||
jsvUnLock(idx);
|
||||
}
|
||||
jsvUnLock(arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _closeFile(JsFile* file)
|
||||
{
|
||||
if(file)
|
||||
{
|
||||
#ifndef LINUX
|
||||
f_close(&file->data.handle);
|
||||
#else
|
||||
fclose(file->data.handle);
|
||||
file->data.handle = 0;
|
||||
#endif
|
||||
file->data.state = FS_CLOSED;
|
||||
fileSetVar(file);
|
||||
}
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "method", "class" : "File", "name" : "write",
|
||||
"generate" : "wrap_fat_write",
|
||||
"description" : [ "write data to a file in byte size chunks"],
|
||||
"params" : [ ["buffer", "JsVar", "an array to use for storing bytes read."],
|
||||
["length", "int32", "is an integer specifying the number of bytes to write."],
|
||||
["position", "int32", "is an integer specifying where to begin writing to in the file.", "If position is null, data will be written from the current file position."],
|
||||
["callback", "JsVar", "a function to call when the data has been written."]],
|
||||
"return" : [ "int32", "the number of bytes written" ]
|
||||
}*/
|
||||
//fs.write(fd, buffer, offset, length, position, callback)
|
||||
size_t wrap_fat_write(JsVar* parent, JsVar* buffer, int length, int position, JsVar* callback)
|
||||
{
|
||||
FRESULT res = 0;
|
||||
size_t bytesWritten = 0;
|
||||
if (jsfsInit())
|
||||
{
|
||||
JsFile file;
|
||||
if (fileGetFromVar(&file, parent))
|
||||
{
|
||||
bytesWritten = file.write(&file, buffer, length, position, &res);
|
||||
}
|
||||
if(callback)
|
||||
{
|
||||
jsvUnLock(jsvAddNamedChild(parent, callback, "#oncomplete"));
|
||||
jsiQueueObjectCallbacks(parent, "#oncomplete", bytesWritten, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (res)
|
||||
{
|
||||
jsfsReportError("Unable to write file", res);
|
||||
}
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
size_t _writeFile(JsFile* file, JsVar* buffer, int length, int position, FRESULT* res)
|
||||
{
|
||||
size_t bytesWritten = 0;
|
||||
if(file->data.mode == FM_WRITE || file->data.mode == FM_READ_WRITE)
|
||||
{
|
||||
if(position >= 0)
|
||||
{
|
||||
#ifndef LINUX
|
||||
f_lseek(&file->data.handle, position);
|
||||
#else
|
||||
fseek(file->data.handle, position, SEEK_SET);
|
||||
#endif
|
||||
}
|
||||
|
||||
JsvStringIterator it;
|
||||
JsVar *dataString = jsvSkipName(buffer);
|
||||
jsvStringIteratorNew(&it, dataString, 0);
|
||||
size_t written = 0;
|
||||
char buf = '\0';
|
||||
int i =0;
|
||||
for(i=0; i<length; i++)
|
||||
{
|
||||
if(!jsvStringIteratorHasChar(&it) || *res!=FR_OK)
|
||||
{
|
||||
break;
|
||||
}
|
||||
buf = jsvStringIteratorGetChar(&it);
|
||||
#ifndef LINUX
|
||||
*res = f_write(&file->data.handle, &buf, sizeof(buf), &written);
|
||||
f_sync(&file->data.handle);
|
||||
#else
|
||||
written = fwrite(&buf, sizeof(buf), sizeof(buf), file->data.handle);
|
||||
fflush(file->data.handle);
|
||||
if(written == 0)
|
||||
{
|
||||
*res = FR_DISK_ERR;
|
||||
}
|
||||
#endif
|
||||
bytesWritten += written;
|
||||
jsvStringIteratorNext(&it);
|
||||
}
|
||||
jsvStringIteratorFree(&it);
|
||||
jsvUnLock(dataString);
|
||||
}
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "method", "class" : "File", "name" : "read",
|
||||
"generate" : "wrap_fat_read",
|
||||
"description" : [ "Read data in a file in byte size chunks"],
|
||||
"params" : [ ["buffer", "JsVar", "an array to use for storing bytes read."],
|
||||
["length", "int32", "is an integer specifying the number of bytes to read."],
|
||||
["position", "int32", "is an integer specifying where to begin reading from in the file.", "If position is null, data will be read from the current file position."],
|
||||
["callback", "JsVar", "a function to call when the data has been read."]],
|
||||
"return" : [ "int32", "the number of bytes read" ]
|
||||
}*/
|
||||
//fs.read(fd, buffer, length, position, callback)
|
||||
size_t wrap_fat_read(JsVar* parent, JsVar* buffer, int length, int position, JsVar* callback)
|
||||
{
|
||||
FRESULT res = 0;
|
||||
size_t bytesRead = 0;
|
||||
if (jsfsInit())
|
||||
{
|
||||
JsFile file;
|
||||
if (fileGetFromVar(&file, parent))
|
||||
{
|
||||
bytesRead = file.read(&file, buffer, length, position, &res);
|
||||
}
|
||||
if(callback)
|
||||
{
|
||||
jsvUnLock(jsvAddNamedChild(parent, callback, "#oncomplete"));
|
||||
jsiQueueObjectCallbacks(parent, "#oncomplete", bytesRead, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (res)
|
||||
{
|
||||
jsfsReportError("Unable to read file", res);
|
||||
}
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
size_t _readFile(JsFile* file, JsVar* buffer, int length, int position, FRESULT* res)
|
||||
{
|
||||
size_t bytesRead = 0;
|
||||
if(file->data.mode == FM_READ || file->data.mode == FM_READ_WRITE)
|
||||
{
|
||||
if(position >= 0)
|
||||
{
|
||||
#ifndef LINUX
|
||||
f_lseek(&file->data.handle, position);
|
||||
#else
|
||||
fseek(file->data.handle, position, SEEK_SET);
|
||||
#endif
|
||||
}
|
||||
size_t readBytes=0;
|
||||
char buf = '\0';
|
||||
int i = 0;
|
||||
for(i=0; i < length;i++)
|
||||
{
|
||||
#ifndef LINUX
|
||||
*res = f_read(&file->data.handle, &buf, sizeof( buf ), &readBytes);
|
||||
if(*res != FR_OK)
|
||||
{
|
||||
break;
|
||||
}
|
||||
#else
|
||||
readBytes = fread(&buf,sizeof( buf ), sizeof( buf ), file->data.handle);
|
||||
if(readBytes > 0)
|
||||
{
|
||||
*res = FR_OK;
|
||||
}
|
||||
#endif
|
||||
jsvAppendStringBuf(buffer, &buf, 1);
|
||||
bytesRead += readBytes;
|
||||
}
|
||||
}
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "staticmethod", "class" : "fs", "name" : "createReadStream",
|
||||
"generate" : "createReadStream",
|
||||
"description" : [ "Create a stream object to read the specified file" ],
|
||||
"params" : [ [ "path", "JsVar", "The path of the file to read" ]],
|
||||
"return" : [ "JsVar", "The ReadStream Object" ]
|
||||
}*/
|
||||
//var r = fs.createReadStream('file.txt');
|
||||
JsVar* createReadStream(JsVar* path) {
|
||||
JsVar *mode = jsvNewFromString("r");
|
||||
if(!mode) return 0; // low memory
|
||||
return wrap_fat_open(path, mode);
|
||||
}
|
||||
|
||||
/*JSON{ "type" : "staticmethod", "class" : "fs", "name" : "createWriteStream",
|
||||
"generate" : "createWriteStream",
|
||||
"description" : [ "Create a stream object to write to the specified file" ],
|
||||
"params" : [ [ "path", "JsVar", "The path of the file to write" ]],
|
||||
"return" : [ "JsVar", "The WriteStream Object" ]
|
||||
}*/
|
||||
//var w = fs.createWriteStream('file.txt');
|
||||
JsVar* createWriteStream(JsVar* path) {
|
||||
JsVar *mode = jsvNewFromString("w");
|
||||
if (!mode) return 0; // low memory
|
||||
return wrap_fat_open(path, mode);
|
||||
}
|
||||
102
libs/jswrap_fs.h
Normal file
102
libs/jswrap_fs.h
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
|
||||
*
|
||||
* Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Contains built-in functions for SD card access
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef LINUX
|
||||
#include "ff.h" // filesystem stuff
|
||||
typedef FIL File_Handle;
|
||||
#define JS_DIR_BUF_SIZE 64
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <dirent.h> // for readdir
|
||||
typedef FILE* File_Handle;
|
||||
typedef int FRESULT;
|
||||
#define FR_OK (0)
|
||||
#define FR_DISK_ERR (1)
|
||||
#define FR_INVALID_NAME (6)
|
||||
#define JS_DIR_BUF_SIZE 256
|
||||
#endif
|
||||
|
||||
#include "jsutils.h"
|
||||
#include "jsvar.h"
|
||||
#include "jsparse.h"
|
||||
#include "jsinteractive.h"
|
||||
|
||||
typedef enum {
|
||||
FT_NONE=0,
|
||||
FT_FILE,
|
||||
FT_STREAM
|
||||
} FileType;
|
||||
|
||||
typedef enum {
|
||||
FM_NONE=0,
|
||||
FM_READ,
|
||||
FM_WRITE,
|
||||
FM_READ_WRITE
|
||||
} FileMode;
|
||||
|
||||
typedef enum {
|
||||
FS_NONE=0,
|
||||
FS_OPEN,
|
||||
FS_CLOSED
|
||||
} FileState;
|
||||
|
||||
typedef struct {
|
||||
File_Handle handle;
|
||||
FileType type;
|
||||
FileMode mode;
|
||||
FileState state;
|
||||
} PACKED_FLAGS JsFileData;
|
||||
|
||||
typedef struct JsFile {
|
||||
JsVar* fileVar; // this won't be locked again - we just know that it is already locked by something else
|
||||
JsFileData data;
|
||||
unsigned char _blank; //< this is needed as jsvGetString for 'data' wants to add a trailing zero
|
||||
size_t (*read)(struct JsFile* file, JsVar* buffer, int length, int position, FRESULT* res);
|
||||
size_t (*write)(struct JsFile* file, JsVar* buffer, int length, int position, FRESULT* res);
|
||||
void (*close)(JsVar* parent);
|
||||
} PACKED_FLAGS JsFile;
|
||||
|
||||
bool jswrap_fs_idle();
|
||||
void jswrap_fs_init();
|
||||
void jswrap_fs_kill();
|
||||
|
||||
bool AllocateJsFile(JsFile* file,FileMode mode, FileType type);
|
||||
bool fileGetFromVar(JsFile *file, JsVar *parent);
|
||||
void fileSetVar(JsFile *file);
|
||||
|
||||
//var file = fs.open(path, mode, callback)
|
||||
JsVar* wrap_fat_open(JsVar* path, JsVar* mode);
|
||||
//file.read(buffer, length, position, callback)
|
||||
size_t wrap_fat_read(JsVar* parent, JsVar* buffer, int length, int position, JsVar* callback);
|
||||
//file.write(buffer, length, position, callback)
|
||||
size_t wrap_fat_write(JsVar* parent, JsVar* buffer, int length, int position, JsVar* callback);
|
||||
//file.pipe(destination, callback)
|
||||
JsVar* wrap_fat_pipe(JsVar* parent, JsVar* destfd, JsVar* chunkSize, JsVar* callback);
|
||||
//file.close(callback)
|
||||
void wrap_fat_close(JsVar* parent);
|
||||
|
||||
//object methods handles
|
||||
bool _Pipe(JsVar* source, JsVar* destination, JsVar* chunkSize, JsVar* position);
|
||||
size_t _readFile(JsFile* file, JsVar* buffer, int length, int position, FRESULT* res);
|
||||
size_t _writeFile(JsFile* file, JsVar* buffer, int length, int position, FRESULT* res);
|
||||
void _closeFile(JsFile* file);
|
||||
|
||||
//var r = fs.createReadStream('file.txt');
|
||||
JsVar* createReadStream(JsVar* path);
|
||||
//var w = fs.createWriteStream('file.txt');
|
||||
JsVar* createWriteStream(JsVar* path);
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
extern bool jsfsInit();
|
||||
extern void jsfsReportError(const char *msg, FRESULT res);
|
||||
#pragma GCC visibility pop
|
||||
@ -21,7 +21,7 @@ FILE=$1
|
||||
MAXSIZE=`grep FLASH_AVAILABLE_FOR_CODE gen/platform_config.h | sed "s/[^0-9]*\([0-9][0-9]*\).*/\1/"`
|
||||
|
||||
|
||||
ACTUALSIZE=$(du -b "$FILE" | cut -f 1)
|
||||
ACTUALSIZE=$(/opt/local/bin/gdu -b "$FILE" | cut -f 1)
|
||||
if [ $ACTUALSIZE -ge $MAXSIZE ]; then
|
||||
echo FAIL - size of $ACTUALSIZE is over $MAXSIZE bytes
|
||||
exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user