├── .gitattributes
├── .gitignore
├── CNAME
├── Crab.png
├── Document
├── 1.大脚蟹快速开发平台学习教程[一]--环境搭建篇.pdf
├── 2.大脚蟹快速开发平台学习教程[二]--基础入门篇.pdf
├── 3.大脚蟹快速开发平台学习教程[三]--高级编程篇.pdf
├── 4.大脚蟹快速开发平台学习教程[四]--MiCO实战篇.pdf
├── CrabBoard.pdf
└── CrabCore.pdf
├── LICENSE
├── README.md
├── README_CN.txt
├── README_EN.txt
├── Studio
├── Bin
│ ├── Crab.exe
│ ├── Crab.ini
│ ├── CrabLink.exe
│ ├── CrabLink.ini
│ ├── CrabStudio.exe
│ └── CrabStudio.ini
├── Demo
│ ├── CR4101.crab
│ ├── Demo.crab
│ ├── EX01_HelloWorld.crab
│ ├── EX02_KeyDemo.crab
│ ├── EX03_KeyEvent.crab
│ ├── EX03_KeyEvent.mark
│ ├── EX04_RemoteControl.crab
│ ├── EX05_AdcSensor.crab
│ ├── EX06_MotoControl.crab
│ └── Empty.crab
├── Drivers
│ ├── NT_AMD64
│ │ ├── usbgap_a64c.cat
│ │ ├── usbgap_a64c.inf
│ │ └── usbgap_a64c.sys
│ └── XP_X86
│ │ ├── usbgap_x86c.cat
│ │ ├── usbgap_x86c.inf
│ │ └── usbgap_x86c.sys
├── Imports
│ └── System.crab
├── Lang
│ ├── Crab.en.lan
│ └── Crab.gb.lan
├── Sublime
│ └── Crab.sublime-package
├── Tutorial
│ ├── Exam1_Var_Declare.crab
│ ├── Exam2_Expression.crab
│ ├── Exam3_If_Switch.crab
│ └── Exam4_Loop.crab
└── VirtualBoard
│ ├── CrabBoard.exe
│ ├── EX01_VB_Demo.bin
│ ├── EX01_VB_Demo.crab
│ ├── EX01_VB_Demo.mark
│ └── VirtualBoard.crab
├── VMS
├── Bin
│ ├── CrabVMS-CR4101.hex
│ └── CrabVMS-CR4101.out
├── Board
│ └── CR4101
│ │ ├── Hardware.c
│ │ └── Hardware.h
├── Core
│ ├── Inc
│ │ ├── CrabBaseType.h
│ │ ├── CrabDatetime.h
│ │ ├── CrabDefaultApi.h
│ │ ├── CrabErrorMsg.h
│ │ ├── CrabExecute.h
│ │ ├── CrabExtern.h
│ │ ├── CrabFifo.h
│ │ ├── CrabMath.h
│ │ ├── CrabStream.h
│ │ ├── CrabString.h
│ │ └── CrabUtility.h
│ ├── Lib
│ │ └── Crab.Core.Lite.CM4F.a
│ └── Port
│ │ ├── CrabConfig.h
│ │ ├── CrabError.c
│ │ └── CrabPlatform.h
├── CrabLogo.h
├── CrabVMS.c
├── CrabVMS.h
├── Demo
│ ├── CR4101.crab
│ ├── Demo.crab
│ ├── EX01_HelloWorld.crab
│ ├── EX02_KeyDemo.crab
│ ├── EX03_KeyEvent.crab
│ ├── EX03_KeyEvent.mark
│ ├── EX04_RemoteControl.crab
│ ├── EX05_AdcSensor.crab
│ ├── EX06_MotoControl.crab
│ ├── EX07_ClockAlarm.crab
│ └── Empty.crab
├── GAP
│ ├── Gap.c
│ └── Gap.h
├── Hardware
│ ├── CrabLCD
│ │ ├── CrabLCD.c
│ │ ├── CrabLCD.h
│ │ └── CrabLCDCfg.h
│ ├── I2C
│ │ ├── I2C_Master.c
│ │ └── I2C_Master.h
│ ├── LCD20400
│ │ ├── LCD20400.c
│ │ ├── LCD20400.h
│ │ └── LCD20400Cfg.h
│ ├── Pulse
│ │ ├── PulseTimer.c
│ │ ├── PulseTimer.h
│ │ ├── PulseWave.c
│ │ ├── PulseWave.h
│ │ └── PulseWaveCfg.c
│ ├── eeprom
│ │ ├── eeprom.c
│ │ ├── eeprom.h
│ │ └── eepromCfg.h
│ ├── nRF24
│ │ ├── nRF24L01.c
│ │ ├── nRF24L01.h
│ │ └── nRF24L01Cfg.h
│ ├── spi_flash
│ │ ├── spiflash.c
│ │ ├── spiflash.h
│ │ └── spiflashCfg.h
│ ├── stm32
│ │ ├── stm32ext.c
│ │ ├── stm32ext.h
│ │ ├── stm32gpio.h
│ │ ├── stm32gpio_def.h
│ │ └── stm32gpio_mode.h
│ ├── stm32f4xx_it.c
│ ├── stm32f4xx_it.h
│ └── usb
│ │ ├── usb_bsp.c
│ │ ├── usb_conf.h
│ │ ├── usb_types.h
│ │ ├── usbd_conf.h
│ │ ├── usbd_desc.c
│ │ ├── usbd_desc.h
│ │ ├── usbd_gap.c
│ │ ├── usbd_gap.h
│ │ └── usbd_hw_init.c
├── Platform
│ ├── CrabAPI.c
│ ├── CrabAPI.h
│ ├── CrabEvent.c
│ ├── CrabEvent.h
│ ├── CrabHardware.c
│ ├── CrabHardware.h
│ ├── CrabStoreStream.c
│ ├── CrabStoreStream.h
│ ├── CrabUserApp.c
│ ├── CrabUserApp.h
│ ├── CrabUserDebug.c
│ ├── CrabUserDebug.h
│ ├── Default
│ │ └── CrabStaticApi.c
│ ├── LCD
│ │ └── CrabLCDdrv.c
│ ├── MiCO
│ │ └── CrabMicoApi.c
│ ├── STM32
│ │ ├── CrabBoardApi.c
│ │ ├── CrabClock.c
│ │ └── CrabPortable.c
│ └── Sensor
│ │ └── CrabSensor.c
├── Project
│ ├── CrabVMS.dep
│ ├── CrabVMS.ewd
│ ├── CrabVMS.ewp
│ ├── CrabVMS.ewt
│ ├── CrabVMS.eww
│ └── settings
│ │ ├── CrabVMS.CR4101.cspy.bat
│ │ ├── CrabVMS.CR4101.driver.xcl
│ │ ├── CrabVMS.CR4101.general.xcl
│ │ ├── CrabVMS.crun
│ │ ├── CrabVMS.dbgdt
│ │ ├── CrabVMS.dni
│ │ ├── CrabVMS.wsdt
│ │ ├── CrabVMS.wspos
│ │ └── CrabVMS_CR4101.jlink
├── RTOS
│ └── FreeRTOS
│ │ ├── FreeRTOSConfig.h
│ │ └── v8.2.3
│ │ ├── croutine.c
│ │ ├── event_groups.c
│ │ ├── include
│ │ ├── FreeRTOS.h
│ │ ├── StackMacros.h
│ │ ├── croutine.h
│ │ ├── deprecated_definitions.h
│ │ ├── event_groups.h
│ │ ├── list.h
│ │ ├── mpu_wrappers.h
│ │ ├── portable.h
│ │ ├── projdefs.h
│ │ ├── queue.h
│ │ ├── semphr.h
│ │ ├── stdint.readme
│ │ ├── task.h
│ │ └── timers.h
│ │ ├── list.c
│ │ ├── portable
│ │ ├── GCC
│ │ │ ├── ARM_CM0
│ │ │ │ ├── port.c
│ │ │ │ └── portmacro.h
│ │ │ ├── ARM_CM3
│ │ │ │ ├── port.c
│ │ │ │ └── portmacro.h
│ │ │ ├── ARM_CM3_MPU
│ │ │ │ ├── port.c
│ │ │ │ └── portmacro.h
│ │ │ ├── ARM_CM4F
│ │ │ │ ├── port.c
│ │ │ │ └── portmacro.h
│ │ │ └── ARM_CM7
│ │ │ │ ├── ReadMe.txt
│ │ │ │ └── r0p1
│ │ │ │ ├── port.c
│ │ │ │ └── portmacro.h
│ │ ├── IAR
│ │ │ ├── ARM_CM0
│ │ │ │ ├── port.c
│ │ │ │ ├── portasm.s
│ │ │ │ └── portmacro.h
│ │ │ ├── ARM_CM3
│ │ │ │ ├── port.c
│ │ │ │ ├── portasm.s
│ │ │ │ └── portmacro.h
│ │ │ ├── ARM_CM4F
│ │ │ │ ├── port.c
│ │ │ │ ├── portasm.s
│ │ │ │ └── portmacro.h
│ │ │ └── ARM_CM7
│ │ │ │ ├── ReadMe.txt
│ │ │ │ └── r0p1
│ │ │ │ ├── port.c
│ │ │ │ ├── portasm.s
│ │ │ │ └── portmacro.h
│ │ ├── Keil
│ │ │ └── See-also-the-RVDS-directory.txt
│ │ └── MemMang
│ │ │ ├── heap_1.c
│ │ │ ├── heap_2.c
│ │ │ ├── heap_3.c
│ │ │ ├── heap_4.c
│ │ │ └── heap_5.c
│ │ ├── queue.c
│ │ ├── readme.txt
│ │ ├── tasks.c
│ │ └── timers.c
├── ST
│ ├── StdPeriph
│ │ ├── inc
│ │ │ ├── misc.h
│ │ │ ├── stm32f4xx_adc.h
│ │ │ ├── stm32f4xx_can.h
│ │ │ ├── stm32f4xx_cec.h
│ │ │ ├── stm32f4xx_crc.h
│ │ │ ├── stm32f4xx_cryp.h
│ │ │ ├── stm32f4xx_dac.h
│ │ │ ├── stm32f4xx_dbgmcu.h
│ │ │ ├── stm32f4xx_dcmi.h
│ │ │ ├── stm32f4xx_dma.h
│ │ │ ├── stm32f4xx_dma2d.h
│ │ │ ├── stm32f4xx_dsi.h
│ │ │ ├── stm32f4xx_exti.h
│ │ │ ├── stm32f4xx_flash.h
│ │ │ ├── stm32f4xx_flash_ramfunc.h
│ │ │ ├── stm32f4xx_fmc.h
│ │ │ ├── stm32f4xx_fmpi2c.h
│ │ │ ├── stm32f4xx_fsmc.h
│ │ │ ├── stm32f4xx_gpio.h
│ │ │ ├── stm32f4xx_hash.h
│ │ │ ├── stm32f4xx_i2c.h
│ │ │ ├── stm32f4xx_iwdg.h
│ │ │ ├── stm32f4xx_lptim.h
│ │ │ ├── stm32f4xx_ltdc.h
│ │ │ ├── stm32f4xx_pwr.h
│ │ │ ├── stm32f4xx_qspi.h
│ │ │ ├── stm32f4xx_rcc.h
│ │ │ ├── stm32f4xx_rng.h
│ │ │ ├── stm32f4xx_rtc.h
│ │ │ ├── stm32f4xx_sai.h
│ │ │ ├── stm32f4xx_sdio.h
│ │ │ ├── stm32f4xx_spdifrx.h
│ │ │ ├── stm32f4xx_spi.h
│ │ │ ├── stm32f4xx_syscfg.h
│ │ │ ├── stm32f4xx_tim.h
│ │ │ ├── stm32f4xx_usart.h
│ │ │ └── stm32f4xx_wwdg.h
│ │ └── src
│ │ │ ├── misc.c
│ │ │ ├── stm32f4xx_adc.c
│ │ │ ├── stm32f4xx_can.c
│ │ │ ├── stm32f4xx_cec.c
│ │ │ ├── stm32f4xx_crc.c
│ │ │ ├── stm32f4xx_cryp.c
│ │ │ ├── stm32f4xx_cryp_aes.c
│ │ │ ├── stm32f4xx_cryp_des.c
│ │ │ ├── stm32f4xx_cryp_tdes.c
│ │ │ ├── stm32f4xx_dac.c
│ │ │ ├── stm32f4xx_dbgmcu.c
│ │ │ ├── stm32f4xx_dcmi.c
│ │ │ ├── stm32f4xx_dma.c
│ │ │ ├── stm32f4xx_dma2d.c
│ │ │ ├── stm32f4xx_dsi.c
│ │ │ ├── stm32f4xx_exti.c
│ │ │ ├── stm32f4xx_flash.c
│ │ │ ├── stm32f4xx_flash_ramfunc.c
│ │ │ ├── stm32f4xx_fmc.c
│ │ │ ├── stm32f4xx_fmpi2c.c
│ │ │ ├── stm32f4xx_fsmc.c
│ │ │ ├── stm32f4xx_gpio.c
│ │ │ ├── stm32f4xx_hash.c
│ │ │ ├── stm32f4xx_hash_md5.c
│ │ │ ├── stm32f4xx_hash_sha1.c
│ │ │ ├── stm32f4xx_i2c.c
│ │ │ ├── stm32f4xx_iwdg.c
│ │ │ ├── stm32f4xx_lptim.c
│ │ │ ├── stm32f4xx_ltdc.c
│ │ │ ├── stm32f4xx_pwr.c
│ │ │ ├── stm32f4xx_qspi.c
│ │ │ ├── stm32f4xx_rcc.c
│ │ │ ├── stm32f4xx_rng.c
│ │ │ ├── stm32f4xx_rtc.c
│ │ │ ├── stm32f4xx_sai.c
│ │ │ ├── stm32f4xx_sdio.c
│ │ │ ├── stm32f4xx_spdifrx.c
│ │ │ ├── stm32f4xx_spi.c
│ │ │ ├── stm32f4xx_syscfg.c
│ │ │ ├── stm32f4xx_tim.c
│ │ │ ├── stm32f4xx_usart.c
│ │ │ └── stm32f4xx_wwdg.c
│ └── USB
│ │ ├── Device
│ │ ├── inc
│ │ │ ├── usbd_conf_template.h
│ │ │ ├── usbd_core.h
│ │ │ ├── usbd_def.h
│ │ │ ├── usbd_ioreq.h
│ │ │ ├── usbd_req.h
│ │ │ └── usbd_usr.h
│ │ └── src
│ │ │ ├── usbd_core.c
│ │ │ ├── usbd_ioreq.c
│ │ │ └── usbd_req.c
│ │ └── Driver
│ │ ├── inc
│ │ ├── usb_bsp.h
│ │ ├── usb_core.h
│ │ ├── usb_dcd.h
│ │ ├── usb_dcd_int.h
│ │ ├── usb_defines.h
│ │ ├── usb_otg.h
│ │ └── usb_regs.h
│ │ └── src
│ │ ├── usb_core.c
│ │ ├── usb_dcd.c
│ │ └── usb_dcd_int.c
├── System
│ ├── Include
│ │ ├── arm_common_tables.h
│ │ ├── arm_const_structs.h
│ │ ├── arm_math.h
│ │ ├── core_cm4.h
│ │ ├── core_cm4_simd.h
│ │ ├── core_cmFunc.h
│ │ ├── core_cmInstr.h
│ │ ├── stm32f4xx.h
│ │ ├── stm32f4xx_conf.h
│ │ └── system_stm32f4xx.h
│ ├── Source
│ │ └── system_stm32f4xx.c
│ ├── StartUp
│ │ ├── startup_stm32f40_41xxx.s
│ │ ├── startup_stm32f40xx.s
│ │ └── startup_stm32f4xx.s
│ ├── main.c
│ └── stm32f411xE.icf
├── Utility
│ ├── CrabUtility.c
│ └── CrabUtility.h
└── VMS
│ ├── CrabApplication.c
│ ├── CrabApplication.h
│ ├── CrabCommand.c
│ ├── CrabCommand.h
│ ├── CrabLog.c
│ ├── CrabLog.h
│ ├── CrabStorage.c
│ ├── CrabStorage.h
│ ├── CrabSystem.c
│ ├── CrabSystem.h
│ ├── CrabTask.c
│ ├── CrabTask.h
│ ├── CrabTaskHook.c
│ ├── CrabVersionFW.h
│ └── CrabVersionFW.ini
└── _config.yml
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
49 | VMS/User/Debug
50 |
51 | .BeFilter
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | crab.io
--------------------------------------------------------------------------------
/Crab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Crab.png
--------------------------------------------------------------------------------
/Document/1.大脚蟹快速开发平台学习教程[一]--环境搭建篇.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/1.大脚蟹快速开发平台学习教程[一]--环境搭建篇.pdf
--------------------------------------------------------------------------------
/Document/2.大脚蟹快速开发平台学习教程[二]--基础入门篇.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/2.大脚蟹快速开发平台学习教程[二]--基础入门篇.pdf
--------------------------------------------------------------------------------
/Document/3.大脚蟹快速开发平台学习教程[三]--高级编程篇.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/3.大脚蟹快速开发平台学习教程[三]--高级编程篇.pdf
--------------------------------------------------------------------------------
/Document/4.大脚蟹快速开发平台学习教程[四]--MiCO实战篇.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/4.大脚蟹快速开发平台学习教程[四]--MiCO实战篇.pdf
--------------------------------------------------------------------------------
/Document/CrabBoard.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/CrabBoard.pdf
--------------------------------------------------------------------------------
/Document/CrabCore.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Document/CrabCore.pdf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 aleyn.wu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 大脚蟹开发平台
2 | =============================
3 | 
4 |
5 | 1.简介
6 | - 大脚蟹是一个面向嵌入式单片机系统的虚拟机平台,它可以让开发者抛开繁锁的硬件底层开发,从而使用简单易用的开发方式,专心开发他自己的应用程序。另一方面,也可以让硬件生产商在开发模式的时候,仅需提供硬件驱动接口,避免让核心硬件驱动直接暴露在初学者面前,从而保护硬件驱动的稳定性。
7 |
8 | 2.特点
9 | - 软硬件分离,让前端软件工程师专注应用程序的开发。
10 | - 专用硬件API接口,让应用程序控制硬件不再困难。
11 | - 兼容C#/Java大部分语法,大大降低语言学习难度。
12 | - 应用程序和硬件驱动程序物理隔离,不但彻底保护硬件驱动程序,更可以使用加密的方式保护应用程序。
13 | - 提供一整套开发过程中所必须的东西,它包括语言编译器,用户程序下载器,硬件日志监控,PC端虚拟设备,虚拟机。
14 |
15 | 3.用户端开发语言
16 | 大脚蟹的用户端开发语言采用CRAB语法,它有以下特点
17 | - 兼容大部分的 C# / Java 语法。
18 | - 关键字和标识符不区分大小写。
19 | - 字符串很方便使用,并且支持多种写法。
20 | - 独有的日期时间格式。
21 | - 有专用的接口和格式,用于软硬件沟通。
22 | - 独有的事件函数。
23 | - IF 语法和 Switch/Case 语法 更加强大好用。
24 | - 支持类(Class)和属性(Property),使用方便。
25 | - 还有其它加快开发的特性。。。
26 |
27 | 4.虚拟机实现端的开发语言
28 | - 是Ansi C,目前在BCB和IAR上编译通过,并运行完好。
29 |
30 | 5.大脚蟹项目资源
31 | - 项目网站:http://www.wisearm.com/crab
32 | - 程序资源:https://github.com/aleyn/Crab
33 | - QQ群组:3603821
34 |
35 | 6.待续...
36 |
37 | Crab Development Platform
38 | =============================
39 | 1.Introduction
40 | - CRAB is a virtual machine platform for embedded microcontroller systems that allows developers to deviate from the underlying hardware development, using an easy-to-use development approach to develop their own applications. On the other hand, you can also let the hardware manufacturer in the development mode, only need to provide hardware-driven interface, to avoid the core hardware drivers directly exposed to the beginners in front, thus protecting the stability of hardware-driven.
41 |
42 | 2. Features
43 | - Hardware and software separation, so that front-end software engineers focus on the development of applications.
44 | - Dedicated hardware API interface, so that the application control hardware is no longer difficult.
45 | - Compatible with C # / Java most of the syntax, greatly reducing the difficulty of language learning.
46 | - Physical isolation of applications and hardware drivers, not only to completely protect the hardware drivers, but also can use encryption to protect the application.
47 | - Provide a set of necessary things in the development process, which includes language compiler, user program downloader, hardware log monitoring, PC-side virtual devices, virtual machines.
48 |
49 | 3. Client development language
50 | client development language using CRAB syntax, it has the following characteristics
51 | - Compatible with most of the C # / Java syntax.
52 | - Keywords and identifiers are not case sensitive.
53 | - Strings are easy to use and support multiple wordings.
54 | - Unique date and time format.
55 | - There are dedicated interfaces and formats for hardware and software communication.
56 | - Unique event function.
57 | - IF syntax and Switch / Case syntax is more powerful and easy to use.
58 | - Support class (Class) and property (Property), easy to use.
59 | - There are other features that accelerate development.
60 |
61 | 4. Virtual machine to achieve the development language
62 | - Is Ansi C, currently compiled on BCB and IAR, and is running well.
63 |
64 | 5.Crab project website and resource
65 | - Website:http://www.wisearm.com/crab
66 | - Resource:https://github.com/aleyn/Crab
67 | - QQ Group: 3603821
68 |
69 | 6.To be continued ...
--------------------------------------------------------------------------------
/README_CN.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/README_CN.txt
--------------------------------------------------------------------------------
/README_EN.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/README_EN.txt
--------------------------------------------------------------------------------
/Studio/Bin/Crab.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Bin/Crab.exe
--------------------------------------------------------------------------------
/Studio/Bin/Crab.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Bin/Crab.ini
--------------------------------------------------------------------------------
/Studio/Bin/CrabLink.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Bin/CrabLink.exe
--------------------------------------------------------------------------------
/Studio/Bin/CrabLink.ini:
--------------------------------------------------------------------------------
1 | Option:[%RootKey%]
2 | [%
3 | %]
4 |
--------------------------------------------------------------------------------
/Studio/Bin/CrabStudio.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Bin/CrabStudio.exe
--------------------------------------------------------------------------------
/Studio/Bin/CrabStudio.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Bin/CrabStudio.ini
--------------------------------------------------------------------------------
/Studio/Demo/CR4101.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/CR4101.crab
--------------------------------------------------------------------------------
/Studio/Demo/Demo.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/Demo.crab
--------------------------------------------------------------------------------
/Studio/Demo/EX01_HelloWorld.crab:
--------------------------------------------------------------------------------
1 | /*========================================
2 | This is a simple DEMO program, it send
3 | a greeting of "Hello World" to
4 | the computer.
5 |
6 | 这是一个最简单的DEMO程序,它向你发送一个
7 | “Hello World” 的问候。
8 | ========================================*/
9 | import system;
10 |
11 | main
12 | {
13 | Print('Hello World');
14 | }
15 |
--------------------------------------------------------------------------------
/Studio/Demo/EX02_KeyDemo.crab:
--------------------------------------------------------------------------------
1 | /*=======================================================
2 | Crab Board Demo
3 | 按键演示程序
4 | =======================================================*/
5 | import CR4101;
6 |
7 | main
8 | {
9 | PrintLn('=== Crab Board KeyPress Demo ===');
10 |
11 | ushort Key = 0;
12 |
13 | //打开事件驱动机制
14 | OpenEvent();
15 |
16 | repeat
17 | {
18 | //读取内置按键
19 | Key = Board.Key;
20 |
21 | if (Key != 0 )
22 | {
23 | if (Key > 0xFF)
24 | {
25 | PrintLn('Key Down: ' # Key);
26 | }
27 | else
28 | {
29 | PrintLn('Key Up: ' # Key);
30 | }
31 | }
32 |
33 | //读取遥控器按键
34 | Key = Board.Input;
35 |
36 | if (Key != 0 )
37 | {
38 | PrintLn('Remote Key: ' # Key);
39 | }
40 |
41 | } until error;
42 |
43 | //关闭事件驱动机制
44 | CloseEvent();
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Studio/Demo/EX03_KeyEvent.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/EX03_KeyEvent.crab
--------------------------------------------------------------------------------
/Studio/Demo/EX03_KeyEvent.mark:
--------------------------------------------------------------------------------
1 | Mark:[%RootKey%]
2 | [%
3 | Output:"$#[PRJ_DIR]\KeyDemo.bin"
4 | CodeOutput:""
5 | BuildDir:"$#[PRJ_DIR]\Build\"
6 | Log:TRUE
7 | Map:FALSE
8 | UTF8Mode:FALSE
9 | Debug:FALSE
10 | %]
11 |
12 | ImportList:[%RootKey%]
13 | [%
14 | ImportDir:"Imports"
15 | %]
16 | [%
17 | ImportDir:"MyImport"
18 | %]
19 |
--------------------------------------------------------------------------------
/Studio/Demo/EX04_RemoteControl.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/EX04_RemoteControl.crab
--------------------------------------------------------------------------------
/Studio/Demo/EX05_AdcSensor.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/EX05_AdcSensor.crab
--------------------------------------------------------------------------------
/Studio/Demo/EX06_MotoControl.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Demo/EX06_MotoControl.crab
--------------------------------------------------------------------------------
/Studio/Demo/Empty.crab:
--------------------------------------------------------------------------------
1 | /*========================================
2 | Create Date: 2016-08-09 17:08
3 | ========================================*/
4 | main
5 | {
6 | //Do it;
7 | }
8 |
--------------------------------------------------------------------------------
/Studio/Drivers/NT_AMD64/usbgap_a64c.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Drivers/NT_AMD64/usbgap_a64c.cat
--------------------------------------------------------------------------------
/Studio/Drivers/NT_AMD64/usbgap_a64c.inf:
--------------------------------------------------------------------------------
1 | ;
2 | ; File Name: usbgap.inf
3 | ; Install information file for usbgap Driver
4 | ;
5 | ; Generated by C DriverWizard 3.2.0 (Build 2485)
6 | ; Requires DDK Only
7 | ; File created on 11/11/2010
8 | ;
9 |
10 | ;--------- Version Section ---------------------------------------------------
11 |
12 | [Version]
13 | Signature="$WINDOWS NT$"
14 | Class=USB
15 | ClassGUID={36fc9e60-c465-11cf-8056-444553540000}
16 | Provider=%Provider%
17 | DriverVer=11/04/2016,2.1.1
18 | CatalogFile=usbgap_a64c.cat
19 |
20 | [ControlFlags]
21 | ; Pnp drivers should not be installable via non-PnP hardware dialogs
22 | ExcludeFromSelect = *
23 |
24 | ;--------- DestinationDirs Section -------------------------------------------
25 |
26 | [DestinationDirs]
27 | DefaultDestDir = 10
28 | usbgap_Files_Driver = 12
29 |
30 |
31 | ;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
32 | ; These sections identify source disks and files for installation.
33 |
34 | [SourceDisksNames]
35 | 1 = %DiskId1%,,,""
36 |
37 | [SourceDisksFiles]
38 | usbgap_a64c.sys = 1,,
39 |
40 |
41 | ;--------- Manufacturer and Models Sections ----------------------------------
42 |
43 | [Manufacturer]
44 | %MfgName% = usbgap_Mfg,NTAmd64
45 |
46 | [usbgap_Mfg.NTAmd64]
47 | ; DisplayName Section DeviceId
48 | %usbgap_DeviceDesc%=usbgap_DDI, USB\VID_2282&PID_902C
49 |
50 | ;---------- DDInstall Sections -----------------------------------------------
51 | ; --------- Windows 98 -----------------
52 |
53 | ; Experimentation has shown that DDInstall root names greater than 19 characters
54 | ; cause problems in Windows 98
55 |
56 | [usbgap_DDI]
57 | CopyFiles=usbgap_Files_Driver
58 | AddReg=usbgap_9X_AddReg
59 |
60 | [usbgap_9X_AddReg]
61 | HKR,,DevLoader,,*ntkern
62 | HKR,,NTMPDriver,,usbgap_a64c.sys
63 | HKR,,Description,,%usbgap_DeviceDesc%
64 |
65 | ; --------- Windows NT -----------------
66 |
67 | [usbgap_DDI.NTAMD64]
68 | CopyFiles=usbgap_Files_Driver
69 |
70 | [usbgap_DDI.NTAMD64.Services]
71 | Addservice = usbgap, %FLG_ADDREG_NOCLOBBER%, usbgap_Service
72 |
73 | ; --------- Service ----------------------
74 |
75 | [usbgap_Service]
76 | DisplayName = %usbgap_SvcDesc%
77 | ServiceType = %SERVICE_KERNEL_DRIVER%
78 | StartType = %SERVICE_DEMAND_START%
79 | ErrorControl = %SERVICE_ERROR_NORMAL%
80 | ServiceBinary = %12%\usbgap_a64c.sys
81 | LoadOrderGroup = Extended Base
82 |
83 | ; --------- Files ----------------------
84 |
85 | [usbgap_Files_Driver]
86 | usbgap_a64c.sys,,,2
87 |
88 | ;--------- Strings Section ---------------------------------------------------
89 |
90 | [Strings]
91 | Provider = "WiseArm"
92 | MfgName = "WiseArm Lab."
93 | usbgap_DeviceDesc = "WiseArm USB-GAP Device - Compliant"
94 | usbgap_SvcDesc = "Driver for USB-GAP Device"
95 | DiskId1 = "usbgap Device Installation Disk #1"
96 |
97 | REG_SZ = 0x00000000
98 | REG_MULTI_SZ = 0x00010000
99 | REG_EXPAND_SZ = 0x00020000
100 | REG_BINARY = 0x00000001
101 | REG_DWORD = 0x00010001
102 | REG_NONE = 0x00020001
103 |
104 | SERVICE_KERNEL_DRIVER = 0x00000001
105 | SERVICE_FILE_SYSTEM_DRIVER = 0x00000002
106 | SERVICE_ADAPTER = 0x00000004
107 | SERVICE_RECOGNIZER_DRIVER = 0x00000008
108 |
109 | SERVICE_BOOT_START = 0x0
110 | SERVICE_SYSTEM_START = 0x1
111 | SERVICE_AUTO_START = 0x2
112 | SERVICE_DEMAND_START = 0x3
113 | SERVICE_DISABLED = 0x4
114 |
115 | SERVICE_ERROR_IGNORE = 0x00000000
116 | SERVICE_ERROR_NORMAL = 0x00000001
117 | SERVICE_ERROR_SEVERE = 0x00000002
118 | SERVICE_ERROR_CRITICAL = 0x00000003
119 |
120 | FLG_ADDREG_NOCLOBBER = 0x00000002
121 | FLG_ADDREG_DELVAL = 0x00000004
122 | FLG_ADDREG_APPEND = 0x00000008
123 | FLG_ADDREG_KEYONLY = 0x00000010
124 | FLG_ADDREG_OVERWRITEONLY = 0x00000020
125 | FLG_ADDREG_64BITKEY = 0x00001000
126 | FLG_ADDREG_KEYONLY_COMMON = 0x00002000
127 | FLG_ADDREG_32BITKEY = 0x00004000
128 |
129 |
--------------------------------------------------------------------------------
/Studio/Drivers/NT_AMD64/usbgap_a64c.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Drivers/NT_AMD64/usbgap_a64c.sys
--------------------------------------------------------------------------------
/Studio/Drivers/XP_X86/usbgap_x86c.cat:
--------------------------------------------------------------------------------
1 | This file will contain the digital signature of the files to be installed on the system.
2 | This file will will be provided by Microsoft upon certification of your drivers.
3 |
--------------------------------------------------------------------------------
/Studio/Drivers/XP_X86/usbgap_x86c.inf:
--------------------------------------------------------------------------------
1 | ;
2 | ; File Name: usbgap.inf
3 | ; Install information file for usbgap Driver
4 | ;
5 | ; Generated by C DriverWizard 3.2.0 (Build 2485)
6 | ; Requires DDK Only
7 | ; File created on 11/11/2010
8 | ;
9 |
10 | ;--------- Version Section ---------------------------------------------------
11 |
12 | [Version]
13 | Signature="$WINDOWS NT$"
14 | Class=USB
15 | ClassGUID={36fc9e60-c465-11cf-8056-444553540000}
16 | Provider=%Provider%
17 | DriverVer=11/03/2016,2.1
18 | CatalogFile=usbgap_x86c.cat
19 |
20 | [ControlFlags]
21 | ; Pnp drivers should not be installable via non-PnP hardware dialogs
22 | ExcludeFromSelect = *
23 |
24 | ;--------- DestinationDirs Section -------------------------------------------
25 |
26 | [DestinationDirs]
27 | DefaultDestDir = 10
28 | usbgap_Files_Driver = 12
29 |
30 |
31 | ;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
32 | ; These sections identify source disks and files for installation.
33 |
34 | [SourceDisksNames]
35 | 1 = %DiskId1%,,,""
36 |
37 | [SourceDisksFiles]
38 | usbgap_x86c.sys = 1,,
39 |
40 |
41 | ;--------- Manufacturer and Models Sections ----------------------------------
42 |
43 | [Manufacturer]
44 | %MfgName% = usbgap_Mfg
45 |
46 | [usbgap_Mfg]
47 | ; DisplayName Section DeviceId
48 | %usbgap_DeviceDesc%=usbgap_DDI, USB\VID_2282&PID_902C
49 |
50 | ;---------- DDInstall Sections -----------------------------------------------
51 | ; --------- Windows 98 -----------------
52 |
53 | ; Experimentation has shown that DDInstall root names greater than 19 characters
54 | ; cause problems in Windows 98
55 |
56 | [usbgap_DDI]
57 | CopyFiles=usbgap_Files_Driver
58 | AddReg=usbgap_9X_AddReg
59 |
60 | [usbgap_9X_AddReg]
61 | HKR,,DevLoader,,*ntkern
62 | HKR,,NTMPDriver,,usbgap_x86c.sys
63 | HKR,,Description,,%usbgap_DeviceDesc%
64 |
65 | ; --------- Windows NT -----------------
66 |
67 | [usbgap_DDI.NT]
68 | CopyFiles=usbgap_Files_Driver
69 |
70 | [usbgap_DDI.NT.Services]
71 | Addservice = usbgap, %FLG_ADDREG_NOCLOBBER%, usbgap_Service
72 |
73 | ; --------- Service ----------------------
74 |
75 | [usbgap_Service]
76 | DisplayName = %usbgap_SvcDesc%
77 | ServiceType = %SERVICE_KERNEL_DRIVER%
78 | StartType = %SERVICE_DEMAND_START%
79 | ErrorControl = %SERVICE_ERROR_NORMAL%
80 | ServiceBinary = %12%\usbgap_x86c.sys
81 | LoadOrderGroup = Extended Base
82 |
83 | ; --------- Files ----------------------
84 |
85 | [usbgap_Files_Driver]
86 | usbgap_x86c.sys,,,2
87 |
88 | ;--------- Strings Section ---------------------------------------------------
89 |
90 | [Strings]
91 | Provider = "WiseArm"
92 | MfgName = "WiseArm Lab."
93 | usbgap_DeviceDesc = "WiseArm USB-GAP Device - Compliant"
94 | usbgap_SvcDesc = "Driver for USB-GAP Device"
95 | DiskId1 = "usbgap Device Installation Disk #1"
96 |
97 | REG_SZ = 0x00000000
98 | REG_MULTI_SZ = 0x00010000
99 | REG_EXPAND_SZ = 0x00020000
100 | REG_BINARY = 0x00000001
101 | REG_DWORD = 0x00010001
102 | REG_NONE = 0x00020001
103 |
104 | SERVICE_KERNEL_DRIVER = 0x00000001
105 | SERVICE_FILE_SYSTEM_DRIVER = 0x00000002
106 | SERVICE_ADAPTER = 0x00000004
107 | SERVICE_RECOGNIZER_DRIVER = 0x00000008
108 |
109 | SERVICE_BOOT_START = 0x0
110 | SERVICE_SYSTEM_START = 0x1
111 | SERVICE_AUTO_START = 0x2
112 | SERVICE_DEMAND_START = 0x3
113 | SERVICE_DISABLED = 0x4
114 |
115 | SERVICE_ERROR_IGNORE = 0x00000000
116 | SERVICE_ERROR_NORMAL = 0x00000001
117 | SERVICE_ERROR_SEVERE = 0x00000002
118 | SERVICE_ERROR_CRITICAL = 0x00000003
119 |
120 | FLG_ADDREG_NOCLOBBER = 0x00000002
121 | FLG_ADDREG_DELVAL = 0x00000004
122 | FLG_ADDREG_APPEND = 0x00000008
123 | FLG_ADDREG_KEYONLY = 0x00000010
124 | FLG_ADDREG_OVERWRITEONLY = 0x00000020
125 | FLG_ADDREG_64BITKEY = 0x00001000
126 | FLG_ADDREG_KEYONLY_COMMON = 0x00002000
127 | FLG_ADDREG_32BITKEY = 0x00004000
128 |
129 |
--------------------------------------------------------------------------------
/Studio/Drivers/XP_X86/usbgap_x86c.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Drivers/XP_X86/usbgap_x86c.sys
--------------------------------------------------------------------------------
/Studio/Imports/System.crab:
--------------------------------------------------------------------------------
1 | /*========================================
2 | System.crab
3 | write by aleyn.wu
4 |
5 | please don't modify this file.
6 |
7 | Create Date: 2015-06-15
8 | Last Update: 2017-03-31
9 | ========================================*/
10 | {# System = true #}
11 | {# Float = (8, 3) #}
12 | {# MSec = false #}
13 |
14 | const VERSION = COMPILER_VERSION;
15 | const DISABLE = 0;
16 | const ENABLE = 1;
17 | const PI = 3.14159;
18 | const SECOND_EVENT = 0x80000000;
19 | const ALARM_EVENT = 0x81000000;
20 |
21 | //System link to system layer API
22 | interface System
23 | {
24 | group Clock
25 | {
26 | property date Today {get; set; index:1; type:'CLOCK';}
27 | property default time Now {get; set; index:2; type:'CLOCK';}
28 | property datetime Calendar {get; set; index:3; type:'CLOCK';}
29 |
30 | extern void SecondEvent(boolean Status) : 'SecondEvent';
31 | }
32 | //Show system infomation
33 | {# API = 0x0001 #}
34 | extern void Infomation();
35 |
36 | //Get input from standard device
37 | {# API = 0x0002 #}
38 | extern void Input(int Type);
39 |
40 | //Pint text to standard device
41 | {# API = 0x0003 #}
42 | extern void Print(string Text);
43 |
44 | //Delay with microseconds
45 | {# API = 0x0004 #}
46 | extern void Delay(uint MSec);
47 |
48 | //Format paramlist with text
49 | {# API = 0x0005 #}
50 | extern void Format(string Text, string Param);
51 |
52 | //Pint text to standard device with line end
53 | {# API = 0x0006 #}
54 | extern void PrintLn(string Text);
55 |
56 | group Alarm
57 | {
58 | default
59 | {
60 | array: true;
61 | }
62 |
63 | extern void Close() : 'AlarmClose';
64 | extern void UpdateWithTime(time Time, boolean EveryDay) : 'AlarmWithTime';
65 | extern void UpdateWithWeek(int Weekday, time Time, boolean EveryWeek) : 'AlarmWithWeek';
66 | extern void UpdateWithDay(int Day, time Time, boolean EveryMonth) : 'AlarmWithDay';
67 | extern void UpdateWithDate(date Date, boolean EveryYear) : 'AlarmWithDate';
68 | }
69 | }
70 |
71 | helper int
72 | {
73 | property int Abs
74 | {
75 | get:'getIntAbs';
76 | }
77 |
78 | extern string ToString() : 'IntToString';
79 | }
80 |
81 | helper date
82 | {
83 | property ushort Year { get:'getDatetimeYear'; set:'setDatetimeYear'; }
84 | property byte Month { get:'getDatetimeMonth'; set:'setDatetimeMonth';}
85 | property byte Day { get:'getDatetimeDay'; set:'setDatetimeDay'; }
86 | property byte Week { get:'getDatetimeWeek'; set:'setDatetimeWeek'; }
87 | }
88 |
89 | helper time
90 | {
91 | property byte Hour { get:'getDatetimeHour'; set:'setDatetimeHour'; }
92 | property byte Min { get:'getDatetimeMin'; set:'setDatetimeMin'; }
93 | property byte Sec { get:'getDatetimeSec'; set:'setDatetimeSec'; }
94 | property ushort MSec { get:'getDatetimeMSec'; set:'setDatetimeMSec'; }
95 | }
96 |
97 | helper datetime
98 | {
99 | property date Date { get:'getDatetimeDate'; set:'setDatetimeDate';}
100 | property time Time { get:'getDatetimeTime'; set:'setDatetimeTime';}
101 | }
102 |
103 | enum Weekdays
104 | {
105 | Sunday = 0,
106 | Monday = 1,
107 | Tuesday = 2,
108 | Wednesday = 3,
109 | Thursday = 4,
110 | Friday = 5,
111 | Saturday = 6
112 | }
--------------------------------------------------------------------------------
/Studio/Lang/Crab.gb.lan:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Lang/Crab.gb.lan
--------------------------------------------------------------------------------
/Studio/Sublime/Crab.sublime-package:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Sublime/Crab.sublime-package
--------------------------------------------------------------------------------
/Studio/Tutorial/Exam1_Var_Declare.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Tutorial/Exam1_Var_Declare.crab
--------------------------------------------------------------------------------
/Studio/Tutorial/Exam2_Expression.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Tutorial/Exam2_Expression.crab
--------------------------------------------------------------------------------
/Studio/Tutorial/Exam3_If_Switch.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Tutorial/Exam3_If_Switch.crab
--------------------------------------------------------------------------------
/Studio/Tutorial/Exam4_Loop.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/Tutorial/Exam4_Loop.crab
--------------------------------------------------------------------------------
/Studio/VirtualBoard/CrabBoard.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/VirtualBoard/CrabBoard.exe
--------------------------------------------------------------------------------
/Studio/VirtualBoard/EX01_VB_Demo.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/VirtualBoard/EX01_VB_Demo.bin
--------------------------------------------------------------------------------
/Studio/VirtualBoard/EX01_VB_Demo.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/VirtualBoard/EX01_VB_Demo.crab
--------------------------------------------------------------------------------
/Studio/VirtualBoard/EX01_VB_Demo.mark:
--------------------------------------------------------------------------------
1 | Mark:[%RootKey%]
2 | [%
3 | Output:""
4 | CodeOutput:""
5 | BuildDir:""
6 | Log:TRUE
7 | Map:FALSE
8 | UTF8Mode:FALSE
9 | Debug:TRUE
10 | %]
11 |
--------------------------------------------------------------------------------
/Studio/VirtualBoard/VirtualBoard.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/Studio/VirtualBoard/VirtualBoard.crab
--------------------------------------------------------------------------------
/VMS/Bin/CrabVMS-CR4101.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Bin/CrabVMS-CR4101.out
--------------------------------------------------------------------------------
/VMS/Board/CR4101/Hardware.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Board/CR4101/Hardware.c
--------------------------------------------------------------------------------
/VMS/Board/CR4101/Hardware.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Board/CR4101/Hardware.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabBaseType.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabBaseType.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabDatetime.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabDatetime.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabDefaultApi.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabDefaultApi.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabErrorMsg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabErrorMsg.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabExecute.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabExecute.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabExtern.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabExtern.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabFifo.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabFifo.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabMath.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabStream.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabString.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabString.h
--------------------------------------------------------------------------------
/VMS/Core/Inc/CrabUtility.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Inc/CrabUtility.h
--------------------------------------------------------------------------------
/VMS/Core/Lib/Crab.Core.Lite.CM4F.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Lib/Crab.Core.Lite.CM4F.a
--------------------------------------------------------------------------------
/VMS/Core/Port/CrabConfig.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Port/CrabConfig.h
--------------------------------------------------------------------------------
/VMS/Core/Port/CrabError.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Port/CrabError.c
--------------------------------------------------------------------------------
/VMS/Core/Port/CrabPlatform.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Core/Port/CrabPlatform.h
--------------------------------------------------------------------------------
/VMS/CrabLogo.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/CrabLogo.h
--------------------------------------------------------------------------------
/VMS/CrabVMS.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/CrabVMS.c
--------------------------------------------------------------------------------
/VMS/CrabVMS.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/CrabVMS.h
--------------------------------------------------------------------------------
/VMS/Demo/CR4101.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/CR4101.crab
--------------------------------------------------------------------------------
/VMS/Demo/Demo.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/Demo.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX01_HelloWorld.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX01_HelloWorld.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX02_KeyDemo.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX02_KeyDemo.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX03_KeyEvent.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX03_KeyEvent.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX03_KeyEvent.mark:
--------------------------------------------------------------------------------
1 | Mark:[%RootKey%]
2 | [%
3 | Output:"$#[PRJ_DIR]\EX03_KeyEvent.bin"
4 | CodeOutput:""
5 | BuildDir:"$#[PRJ_DIR]\Build\"
6 | Log:TRUE
7 | Map:FALSE
8 | UTF8Mode:FALSE
9 | Debug:FALSE
10 | %]
11 |
12 | ImportList:[%RootKey%]
13 | [%
14 | ImportDir:"Imports"
15 | %]
16 | [%
17 | ImportDir:"MyImport"
18 | %]
19 |
--------------------------------------------------------------------------------
/VMS/Demo/EX04_RemoteControl.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX04_RemoteControl.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX05_AdcSensor.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX05_AdcSensor.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX06_MotoControl.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX06_MotoControl.crab
--------------------------------------------------------------------------------
/VMS/Demo/EX07_ClockAlarm.crab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Demo/EX07_ClockAlarm.crab
--------------------------------------------------------------------------------
/VMS/Demo/Empty.crab:
--------------------------------------------------------------------------------
1 | /*========================================
2 | Create Date: 2016-08-09 17:08
3 | ========================================*/
4 | main
5 | {
6 | //Do it;
7 | }
8 |
--------------------------------------------------------------------------------
/VMS/GAP/Gap.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/GAP/Gap.c
--------------------------------------------------------------------------------
/VMS/GAP/Gap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/GAP/Gap.h
--------------------------------------------------------------------------------
/VMS/Hardware/CrabLCD/CrabLCD.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/CrabLCD/CrabLCD.c
--------------------------------------------------------------------------------
/VMS/Hardware/CrabLCD/CrabLCD.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/CrabLCD/CrabLCD.h
--------------------------------------------------------------------------------
/VMS/Hardware/CrabLCD/CrabLCDCfg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/CrabLCD/CrabLCDCfg.h
--------------------------------------------------------------------------------
/VMS/Hardware/I2C/I2C_Master.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/I2C/I2C_Master.c
--------------------------------------------------------------------------------
/VMS/Hardware/I2C/I2C_Master.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/I2C/I2C_Master.h
--------------------------------------------------------------------------------
/VMS/Hardware/LCD20400/LCD20400.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/LCD20400/LCD20400.c
--------------------------------------------------------------------------------
/VMS/Hardware/LCD20400/LCD20400.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/LCD20400/LCD20400.h
--------------------------------------------------------------------------------
/VMS/Hardware/LCD20400/LCD20400Cfg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/LCD20400/LCD20400Cfg.h
--------------------------------------------------------------------------------
/VMS/Hardware/Pulse/PulseTimer.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/Pulse/PulseTimer.c
--------------------------------------------------------------------------------
/VMS/Hardware/Pulse/PulseTimer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/Pulse/PulseTimer.h
--------------------------------------------------------------------------------
/VMS/Hardware/Pulse/PulseWave.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/Pulse/PulseWave.c
--------------------------------------------------------------------------------
/VMS/Hardware/Pulse/PulseWave.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/Pulse/PulseWave.h
--------------------------------------------------------------------------------
/VMS/Hardware/Pulse/PulseWaveCfg.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/Pulse/PulseWaveCfg.c
--------------------------------------------------------------------------------
/VMS/Hardware/eeprom/eeprom.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/eeprom/eeprom.c
--------------------------------------------------------------------------------
/VMS/Hardware/eeprom/eeprom.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/eeprom/eeprom.h
--------------------------------------------------------------------------------
/VMS/Hardware/eeprom/eepromCfg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/eeprom/eepromCfg.h
--------------------------------------------------------------------------------
/VMS/Hardware/nRF24/nRF24L01.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/nRF24/nRF24L01.c
--------------------------------------------------------------------------------
/VMS/Hardware/nRF24/nRF24L01.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/nRF24/nRF24L01.h
--------------------------------------------------------------------------------
/VMS/Hardware/nRF24/nRF24L01Cfg.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/nRF24/nRF24L01Cfg.h
--------------------------------------------------------------------------------
/VMS/Hardware/spi_flash/spiflash.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file spi_flash.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 30-September-2011
7 | * @brief This file contains all the functions prototypes for the spi_flash
8 | * firmware driver.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | *
© COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __SPI_FLASH_H
25 | #define __SPI_FLASH_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f4xx.h"
33 | #include "stm32ext.h"
34 | #include "spiflashcfg.h"
35 |
36 | /* Exported types ------------------------------------------------------------*/
37 | /* Exported constants --------------------------------------------------------*/
38 |
39 | /* M25P SPI Flash supported commands */
40 | #define sFLASH_CMD_READ 0x03 /* Read from Memory instruction */
41 | #define sFLASH_CMD_RAAI 0x0B /* High Speed Read from Memory instruction */
42 | #define sFLASH_CMD_WRITE 0x02 /* Write to Memory instruction */
43 | #define sFLASH_CMD_WAAI 0xAD /* Write to Memory AAI Mode */
44 | #define sFLASH_CMD_WREN 0x06 /* Write enable instruction */
45 | #define sFLASH_CMD_WRDI 0x04 /* Write Disable instruction */
46 | #define sFLASH_CMD_RDSR 0x05 /* Read Status Register instruction */
47 | #define sFLASH_CMD_RDSR2 0x35 /* Read Status Register 2 instruction */
48 | #define sFLASH_CMD_WRSR 0x01 /* Write Status Register instruction */
49 | #define sFLASH_CMD_EWSR 0x50 /* Enable Write Status Register instruction */
50 | #define sFLASH_CMD_RDID 0x9F /* Read identification */
51 | #define sFLASH_CMD_SE04 0x20 /* Sector Erase instruction 4K Memory*/
52 | #define sFLASH_CMD_SE32 0x52 /* Sector Erase instruction 32K Memory*/
53 | #define sFLASH_CMD_SE64 0xD8 /* Sector Erase instruction 64K Memory*/
54 | #define sFLASH_CMD_BE 0xC7 /* Bulk Erase instruction */
55 | #define sFLASH_CMD_EBSY 0x70 /* Enable SO as RD/BY instruction */
56 | #define sFLASH_CMD_DBSY 0x80 /* Disable SO as RD/BY instruction */
57 | #define sFLASH_CMD_RDUID 0x4B /* Read Union identification */
58 |
59 | #define sFLASH_WIP_FLAG 0x01 /* Write In Progress (WIP) flag */
60 |
61 | #define sFLASH_DUMMY_BYTE 0xA5
62 | #define sFLASH_SPI_PAGESIZE 0x100
63 |
64 | #define sFLASH_SECTOR_4K 0x1000 /* Sector 4K Memory*/
65 | #define sFLASH_SECTOR_32K 0x8000 /* Sector 32K Memory*/
66 | #define sFLASH_SECTOR_64K 0x10000 /* Sector 64K Memory*/
67 |
68 | #define sFLASH_M25P128_ID 0x202018
69 | #define sFLASH_M25P64_ID 0x202017
70 | #define sFLASH_M25P32_ID 0x202016
71 | #define sFLASH_M25P16_ID 0x202015
72 | #define sFLASH_W25Q64FV_ID 0xEF4017
73 |
74 | /* Exported macro ------------------------------------------------------------*/
75 | /* Select sFLASH: Chip Select pin low */
76 | #define sFLASH_CS_LOW() GPIO_SetBit(sFLASH_SPI_CS_PIN, 0)
77 | /* Deselect sFLASH: Chip Select pin high */
78 | #define sFLASH_CS_HIGH() GPIO_SetBit(sFLASH_SPI_CS_PIN, 1)
79 |
80 | #define sFLASH_SO_STAT() GPIO_GetInputBit(sFLASH_SPI_MISO_PIN)
81 |
82 | #define sFLASH_PageWrite sFLASH_PageWriteW25
83 |
84 | /* Exported functions ------------------------------------------------------- */
85 |
86 | /* High layer functions */
87 | void sFLASH_DeInit(void);
88 | void sFLASH_Init(void);
89 | void sFLASH_LowLevel_Init(void);
90 | void sFLASH_EraseSector(uint32_t SectorAddr, uint32_t SectorSize);
91 | void sFLASH_EraseBulk(void);
92 | void sFLASH_ByteWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
93 |
94 | void sFLASH_PageWriteS25(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
95 | void sFLASH_PageWriteW25(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
96 |
97 | void sFLASH_WriteBuffer(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
98 | void sFLASH_ReadBuffer(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);
99 | uint32_t sFLASH_ReadID(void);
100 | void sFLASH_ReadUID(uint8_t* pBuffer);
101 | uint8_t sFLASH_ReadStatus(void);
102 | uint8_t sFLASH_ReadExtStatus(void);
103 | void sFLASH_WriteStatus(uint8_t Status);
104 | void sFLASH_StartReadSequence(uint32_t ReadAddr);
105 |
106 | /* Low layer functions */
107 | uint8_t sFLASH_ReadByte(void);
108 | uint8_t sFLASH_SendByte(uint8_t byte);
109 | uint16_t sFLASH_SendHalfWord(uint16_t HalfWord);
110 | void sFLASH_SendAddr(uint32_t Addr);
111 | void sFLASH_WriteCmd(uint8_t Cmd);
112 | void sFLASH_WaitForWriteEnd(void);
113 |
114 | #ifdef __cplusplus
115 | }
116 | #endif
117 |
118 | #endif /* __SPI_FLASH_H */
119 |
120 |
121 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
122 |
--------------------------------------------------------------------------------
/VMS/Hardware/spi_flash/spiflashCfg.h:
--------------------------------------------------------------------------------
1 | /* Define to prevent recursive inclusion -------------------------------------*/
2 | #ifndef __SPI_FLASH_CFG_H
3 | #define __SPI_FLASH_CFG_H
4 |
5 | #ifdef __cplusplus
6 | extern "C" {
7 | #endif
8 |
9 | /* Includes ------------------------------------------------------------------*/
10 |
11 | /* M25P FLASH SPI Interface pins */
12 | #define sFLASH_SPI SPI2
13 | #define sFLASH_SPI_CLK RCC_APB1Periph_SPI2
14 | #define sFLASH_SPI_CLK_INIT RCC_APB1PeriphClockCmd
15 | #define sFLASH_SPI_AF GPIO_AF_SPI2
16 | #define sFLASH_SPI_BaudRate SPI_BaudRatePrescaler_8
17 |
18 | #define sFLASH_SPI_SCK_PIN GPIO_PB13
19 | #define sFLASH_SPI_MISO_PIN GPIO_PB14
20 | #define sFLASH_SPI_MOSI_PIN GPIO_PB15
21 | #define sFLASH_SPI_CS_PIN GPIO_PB12
22 |
23 | #ifdef __cplusplus
24 | }
25 | #endif
26 |
27 | #endif /* __SPI_FLASH_H */
28 |
29 |
30 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
31 |
--------------------------------------------------------------------------------
/VMS/Hardware/stm32/stm32ext.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/stm32/stm32ext.c
--------------------------------------------------------------------------------
/VMS/Hardware/stm32/stm32ext.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/stm32/stm32ext.h
--------------------------------------------------------------------------------
/VMS/Hardware/stm32/stm32gpio.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_gpio.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the GPIO firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2015 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F_GPIO_H
31 | #define __STM32F_GPIO_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 |
39 | /**
40 | * @brief GPIO Configuration Mode enumeration
41 | */
42 | typedef enum
43 | {
44 | GPIO_Mode_AN = 0x00, /*!< GPIO Analog Mode */
45 | GPIO_Mode_IN = 0x04, /*!< GPIO Input Mode */
46 | GPIO_Mode_OUT = 0x10, /*!< GPIO Output Mode */
47 | GPIO_Mode_AF = 0x18, /*!< GPIO Alternate function Mode */
48 | }GPIOMode_Typedef;
49 |
50 | /**
51 | * @brief GPIO Output type enumeration
52 | */
53 | typedef enum
54 | {
55 | GPIO_OType_PP = 0x00,
56 | GPIO_OType_OD = 0x04
57 | }GPIOOType_Typedef;
58 |
59 | /**
60 | * @brief GPIO Output Maximum frequency enumeration
61 | */
62 | typedef enum
63 | {
64 | GPIO_Low_Speed = 0x00, /*!< Low speed */
65 | GPIO_Medium_Speed = 0x01, /*!< Medium speed */
66 | GPIO_Fast_Speed = 0x02, /*!< Fast speed */
67 | GPIO_High_Speed = 0x03 /*!< High speed */
68 | }GPIOSpeed_Typedef;
69 |
70 | /**
71 | * @brief GPIO Configuration PullUp PullDown enumeration
72 | */
73 | typedef enum
74 | {
75 | GPIO_PuPd_NOPULL = 0x04,
76 | GPIO_PuPd_UP = 0x48,
77 | GPIO_PuPd_DOWN = 0x28
78 | }GPIOPuPd_Typedef;
79 |
80 | /**
81 | * @brief GPIO Init structure definition
82 | */
83 | typedef struct
84 | {
85 | uint32_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured.
86 | This parameter can be any value of @ref GPIO_pins_define */
87 |
88 | GPIOMode_Typedef GPIO_Mode; /*!< Specifies the operating mode for the selected pins.
89 | This parameter can be a value of @ref GPIOMode_TypeDef */
90 |
91 | GPIOSpeed_Typedef GPIO_Speed; /*!< Specifies the speed for the selected pins.
92 | This parameter can be a value of @ref GPIOSpeed_TypeDef */
93 |
94 | GPIOOType_Typedef GPIO_OType; /*!< Specifies the operating output type for the selected pins.
95 | This parameter can be a value of @ref GPIOOType_TypeDef */
96 |
97 | GPIOPuPd_Typedef GPIO_PuPd; /*!< Specifies the operating Pull-up/Pull down for the selected pins.
98 | This parameter can be a value of @ref GPIOPuPd_TypeDef */
99 | }GPIO_InitTypedef;
100 |
101 | #ifdef __cplusplus
102 | }
103 | #endif
104 |
105 | #endif /*__STM32F4xx_GPIO_H */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 |
115 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
116 |
--------------------------------------------------------------------------------
/VMS/Hardware/stm32/stm32gpio_def.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/stm32/stm32gpio_def.h
--------------------------------------------------------------------------------
/VMS/Hardware/stm32/stm32gpio_mode.h:
--------------------------------------------------------------------------------
1 | /******************** Copyright wisearm.com *********************************
2 | * File Name : stm32gpio_mode.h
3 | * Author : 吴创明(aleyn.wu)
4 | * Version : V1.0.0
5 | * Create Date : 2009-02-02
6 | * Last Update : 2017-07-18
7 | * Description : GPIO Mode define.
8 | ********************************************************************************/
9 | #ifndef __STM32EXT_GPIO_MODE_H
10 | #define __STM32EXT_GPIO_MODE_H
11 |
12 | #define GPIO_MODE_IND GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
13 | #define GPIO_MODE_INU GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
14 | #define GPIO_MODE_GET GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
15 | #define GPIO_MODE_PUT GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
16 | #define GPIO_MODE_INT GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
17 | #define GPIO_MODE_KEY GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
18 | #define GPIO_MODE_LED GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
19 | #define GPIO_MODE_DAT GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
20 | #define GPIO_MODE_ADC GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
21 | #define GPIO_MODE_I2C GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_Low, GPIO_OType_OD, GPIO_PuPd_NOPULL)
22 | #define GPIO_MODE_PWM GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
23 | #define GPIO_MODE_USB GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
24 | #define GPIO_MODE_USART GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_Mid, GPIO_OType_PP, GPIO_PuPd_UP)
25 | #define GPIO_MODE_SPI GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
26 |
27 | #define GPIO_MODE_IHPD GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
28 | #define GPIO_MODE_IHPU GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
29 | #define GPIO_MODE_IHPN GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
30 |
31 | #define GPIO_MODE_IHOD GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_DOWN)
32 | #define GPIO_MODE_IHOU GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_UP)
33 | #define GPIO_MODE_IHON GPIO_SETUP(GPIO_Mode_IN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_NOPULL)
34 |
35 | #define GPIO_MODE_OHPD GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
36 | #define GPIO_MODE_OHPU GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
37 | #define GPIO_MODE_OHPN GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
38 |
39 | #define GPIO_MODE_OHOD GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_DOWN)
40 | #define GPIO_MODE_OHOU GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_UP)
41 | #define GPIO_MODE_OHON GPIO_SETUP(GPIO_Mode_OUT, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_NOPULL)
42 |
43 | #define GPIO_MODE_AHPD GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
44 | #define GPIO_MODE_AHPU GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
45 | #define GPIO_MODE_AHPN GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
46 |
47 | #define GPIO_MODE_AHOD GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_DOWN)
48 | #define GPIO_MODE_AHOU GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_UP)
49 | #define GPIO_MODE_AHON GPIO_SETUP(GPIO_Mode_AN, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_NOPULL)
50 |
51 | #define GPIO_MODE_FHPD GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_DOWN)
52 | #define GPIO_MODE_FHPU GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_UP)
53 | #define GPIO_MODE_FHPN GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_PP, GPIO_PuPd_NOPULL)
54 |
55 | #define GPIO_MODE_FHOD GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_DOWN)
56 | #define GPIO_MODE_FHOU GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_UP)
57 | #define GPIO_MODE_FHON GPIO_SETUP(GPIO_Mode_AF, GPIO_Speed_High, GPIO_OType_OD, GPIO_PuPd_NOPULL)
58 |
59 | #endif
--------------------------------------------------------------------------------
/VMS/Hardware/stm32f4xx_it.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_it.c
4 | * @author MCD Application Team
5 | * @version V1.4.0
6 | * @date 04-August-2014
7 | * @brief Main Interrupt Service Routines.
8 | * This file provides template for all exceptions handler and
9 | * peripherals interrupt service routine.
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * © COPYRIGHT 2014 STMicroelectronics
14 | *
15 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
16 | * You may not use this file except in compliance with the License.
17 | * You may obtain a copy of the License at:
18 | *
19 | * http://www.st.com/software_license_agreement_liberty_v2
20 | *
21 | * Unless required by applicable law or agreed to in writing, software
22 | * distributed under the License is distributed on an "AS IS" BASIS,
23 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | * See the License for the specific language governing permissions and
25 | * limitations under the License.
26 | *
27 | ******************************************************************************
28 | */
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "stm32f4xx_it.h"
32 |
33 | /** @addtogroup Template_Project
34 | * @{
35 | */
36 |
37 | /* Private typedef -----------------------------------------------------------*/
38 | /* Private define ------------------------------------------------------------*/
39 | /* Private macro -------------------------------------------------------------*/
40 | /* Private variables ---------------------------------------------------------*/
41 | /* Private function prototypes -----------------------------------------------*/
42 | /* Private functions ---------------------------------------------------------*/
43 |
44 | /******************************************************************************/
45 | /* Cortex-M4 Processor Exceptions Handlers */
46 | /******************************************************************************/
47 |
48 | /**
49 | * @brief This function handles NMI exception.
50 | * @param None
51 | * @retval None
52 | */
53 | void NMI_Handler(void)
54 | {
55 | }
56 |
57 | /**
58 | * @brief This function handles Hard Fault exception.
59 | * @param None
60 | * @retval None
61 | */
62 | void HardFault_Handler(void)
63 | {
64 | /* Go to infinite loop when Hard Fault exception occurs */
65 | while (1)
66 | {
67 | }
68 | }
69 |
70 | /**
71 | * @brief This function handles Memory Manage exception.
72 | * @param None
73 | * @retval None
74 | */
75 | void MemManage_Handler(void)
76 | {
77 | /* Go to infinite loop when Memory Manage exception occurs */
78 | while (1)
79 | {
80 | }
81 | }
82 |
83 | /**
84 | * @brief This function handles Bus Fault exception.
85 | * @param None
86 | * @retval None
87 | */
88 | void BusFault_Handler(void)
89 | {
90 | /* Go to infinite loop when Bus Fault exception occurs */
91 | while (1)
92 | {
93 | }
94 | }
95 |
96 | /**
97 | * @brief This function handles Usage Fault exception.
98 | * @param None
99 | * @retval None
100 | */
101 | void UsageFault_Handler(void)
102 | {
103 | /* Go to infinite loop when Usage Fault exception occurs */
104 | while (1)
105 | {
106 | }
107 | }
108 |
109 | /**
110 | * @brief This function handles SVCall exception.
111 | * @param None
112 | * @retval None
113 | */
114 | //void SVC_Handler(void)
115 | //{
116 | //}
117 |
118 | /**
119 | * @brief This function handles Debug Monitor exception.
120 | * @param None
121 | * @retval None
122 | */
123 | void DebugMon_Handler(void)
124 | {
125 | }
126 |
127 | /**
128 | * @brief This function handles PendSVC exception.
129 | * @param None
130 | * @retval None
131 | */
132 | //void PendSV_Handler(void)
133 | //{
134 | //}
135 |
136 | /**
137 | * @brief This function handles SysTick Handler.
138 | * @param None
139 | * @retval None
140 | */
141 | //void SysTick_Handler(void)
142 | //{
143 | //raw_enter_interrupt();
144 | //raw_time_tick();
145 | //raw_finish_int();
146 | //}
147 |
148 | /******************************************************************************/
149 | /* STM32F4xx Peripherals Interrupt Handlers */
150 | /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
151 | /* available peripheral interrupt handler's name please refer to the startup */
152 | /* file (startup_stm32f4xx.s). */
153 | /******************************************************************************/
154 |
155 | void USART6_IRQHandler(void)
156 | {
157 | /*
158 | raw_enter_interrupt();
159 | if ( USART_GetFlagStatus(USART6, USART_FLAG_RXNE) != RESET)
160 | {
161 | USART_ITConfig(USART6, USART_IT_RXNE, DISABLE);
162 | ProtocolManage_Resume();
163 | }
164 | raw_finish_int();
165 | */
166 | }
167 |
168 |
169 | void EXTI4_IRQHandler(void)
170 | {
171 | /*raw_enter_interrupt();
172 | if(EXTI_GetITStatus(EXTI_Line4) != RESET)
173 | {
174 | ProtocolManage_Resume();
175 | EXTI_ClearITPendingBit(EXTI_Line4);
176 | }
177 | raw_finish_int();*/
178 | }
179 |
180 | void EXTI9_5_IRQHandler(void)
181 | {
182 | //raw_enter_interrupt();
183 | /*if(EXTI_GetITStatus(EXTI_Line9) != RESET)
184 | {
185 | printf("CONFIG Reg[%.2X] = %.2X;\n", 0x00, nRF24_ReadReg(0x00));
186 | printf("STATUS Reg[%.2X] = %.2X;\n", 0x07, nRF24_ReadReg(0x07));
187 | printf("OBSERVE Reg[%.2X] = %.2X;\n", 0x08, nRF24_ReadReg(0x08));
188 | printf("FIFO Reg[%.2X] = %.2X;\n", 0x17, nRF24_ReadReg(0x17));
189 |
190 | printf("CHANNEL Reg[%.2X] = %d;\n", 5, nRF24_ReadReg(5));
191 |
192 | nRF24_ReadBuf(0x10, Params, 5);
193 | printf("TX Address[10] = ");
194 | PrintHex(Params, 5);
195 |
196 | for (uint8_t Value=0; Value<2; Value++)
197 | {
198 | nRF24_ReadBuf(0x0A + Value, Params, 5);
199 | printf("P%d Address[%.2X] = ", Value, Value + 0x0A);
200 | PrintHex(Params, 5);
201 | }
202 |
203 | EXTI_ClearITPendingBit(EXTI_Line9);
204 | }*/
205 | //raw_finish_int();
206 | }
207 |
208 |
209 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
210 |
--------------------------------------------------------------------------------
/VMS/Hardware/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_it.h
4 | * @author MCD Application Team
5 | * @version V1.4.0
6 | * @date 04-August-2014
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2014 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __STM32F4xx_IT_H
30 | #define __STM32F4xx_IT_H
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | /* Includes ------------------------------------------------------------------*/
37 | #include "stm32f4xx.h"
38 | //#include "raw_api.h"
39 | //#include "Hardware.h"
40 | //#include "TaskManage.h"
41 |
42 | /* Exported types ------------------------------------------------------------*/
43 | /* Exported constants --------------------------------------------------------*/
44 | /* Exported macro ------------------------------------------------------------*/
45 | /* Exported functions ------------------------------------------------------- */
46 |
47 | void NMI_Handler(void);
48 | void HardFault_Handler(void);
49 | void MemManage_Handler(void);
50 | void BusFault_Handler(void);
51 | void UsageFault_Handler(void);
52 | //void SVC_Handler(void);
53 | void DebugMon_Handler(void);
54 | //void PendSV_Handler(void);
55 | //void SysTick_Handler(void);
56 |
57 | void USART6_IRQHandler(void);
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __STM32F4xx_IT_H */
64 |
65 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usb_bsp.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usb_bsp.c
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usb_types.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usb_types.h
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_conf.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_conf.h
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_desc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_desc.c
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_desc.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_desc.h
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_gap.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_gap.c
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_gap.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_gap.h
--------------------------------------------------------------------------------
/VMS/Hardware/usb/usbd_hw_init.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Hardware/usb/usbd_hw_init.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabAPI.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabAPI.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabAPI.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabAPI.h
--------------------------------------------------------------------------------
/VMS/Platform/CrabEvent.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabEvent.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabEvent.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabEvent.h
--------------------------------------------------------------------------------
/VMS/Platform/CrabHardware.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabHardware.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabHardware.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabHardware.h
--------------------------------------------------------------------------------
/VMS/Platform/CrabStoreStream.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabStoreStream.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabStoreStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabStoreStream.h
--------------------------------------------------------------------------------
/VMS/Platform/CrabUserApp.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabUserApp.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabUserApp.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabUserApp.h
--------------------------------------------------------------------------------
/VMS/Platform/CrabUserDebug.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabUserDebug.c
--------------------------------------------------------------------------------
/VMS/Platform/CrabUserDebug.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/CrabUserDebug.h
--------------------------------------------------------------------------------
/VMS/Platform/Default/CrabStaticApi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/Default/CrabStaticApi.c
--------------------------------------------------------------------------------
/VMS/Platform/LCD/CrabLCDdrv.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/LCD/CrabLCDdrv.c
--------------------------------------------------------------------------------
/VMS/Platform/MiCO/CrabMicoApi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/MiCO/CrabMicoApi.c
--------------------------------------------------------------------------------
/VMS/Platform/STM32/CrabBoardApi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/STM32/CrabBoardApi.c
--------------------------------------------------------------------------------
/VMS/Platform/STM32/CrabClock.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/STM32/CrabClock.c
--------------------------------------------------------------------------------
/VMS/Platform/STM32/CrabPortable.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/STM32/CrabPortable.c
--------------------------------------------------------------------------------
/VMS/Platform/Sensor/CrabSensor.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Platform/Sensor/CrabSensor.c
--------------------------------------------------------------------------------
/VMS/Project/CrabVMS.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\CrabVMS.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.CR4101.cspy.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Project/settings/CrabVMS.CR4101.cspy.bat
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.CR4101.driver.xcl:
--------------------------------------------------------------------------------
1 | "--endian=little"
2 |
3 | "--cpu=Cortex-M4"
4 |
5 | "--fpu=VFPv4_SP"
6 |
7 | "-p"
8 |
9 | "C:\IAR\ARM\v7502\arm\CONFIG\debugger\ST\STM32F411CE.ddf"
10 |
11 | "--drv_verify_download"
12 |
13 | "--semihosting=none"
14 |
15 | "--device=STM32F411CE"
16 |
17 | "--drv_communication=USB0"
18 |
19 | "--drv_interface_speed=auto"
20 |
21 | "--jlink_initial_speed=100"
22 |
23 | "--jlink_reset_strategy=0,0"
24 |
25 | "--drv_interface=SWD"
26 |
27 | "--drv_catch_exceptions=0x000"
28 |
29 | "--drv_swo_clock_setup=96000000,0,8000000"
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.CR4101.general.xcl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/Project/settings/CrabVMS.CR4101.general.xcl
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.crun:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 |
6 |
7 | *
8 | *
9 | *
10 | 0
11 | 1
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.dni:
--------------------------------------------------------------------------------
1 | [Stack]
2 | FillEnabled=0
3 | OverflowWarningsEnabled=1
4 | WarningThreshold=90
5 | SpWarningsEnabled=1
6 | WarnLogOnly=1
7 | UseTrigger=1
8 | TriggerName=main
9 | LimitSize=0
10 | ByteLimit=50
11 | [JLinkDriver]
12 | CStepIntDis=_ 0
13 | TraceBufferSize=0x00010000
14 | TraceStallIfFIFOFull=0x00000000
15 | TracePortSize=0x00000004
16 | [DebugChecksum]
17 | Checksum=-347159436
18 | [CodeCoverage]
19 | Enabled=_ 0
20 | [Exceptions]
21 | StopOnUncaught=_ 0
22 | StopOnThrow=_ 0
23 | [CallStack]
24 | ShowArgs=0
25 | [Disassembly]
26 | MixedMode=1
27 | [SWOTraceHWSettings]
28 | OverrideDefaultClocks=0
29 | CpuClock=96000000
30 | ClockAutoDetect=0
31 | ClockWanted=7500000
32 | JtagSpeed=7500000
33 | Prescaler=13
34 | TimeStampPrescIndex=0
35 | TimeStampPrescData=0
36 | PcSampCYCTAP=1
37 | PcSampPOSTCNT=15
38 | PcSampIndex=0
39 | DataLogMode=0
40 | ITMportsEnable=0
41 | ITMportsTermIO=0
42 | ITMportsLogFile=0
43 | ITMlogFile=$PROJ_DIR$\ITM.log
44 | [struct_types]
45 | Fmt0=TGapDetect-DeviceID 4 0
46 | Fmt1=TGapDetect-VenderID 4 0
47 | [Trace1]
48 | Enabled=0
49 | ShowSource=1
50 | [Trace2]
51 | Enabled=0
52 | ShowSource=0
53 | [SWOTraceWindow]
54 | PcSampling=0
55 | InterruptLogs=0
56 | ForcedTimeStamps=0
57 | EventCPI=0
58 | EventEXC=0
59 | EventFOLD=0
60 | EventLSU=0
61 | EventSLEEP=0
62 | [PowerLog]
63 | Title_0=I0
64 | Symbol_0=0 4 0
65 | LogEnabled=0
66 | GraphEnabled=0
67 | ShowTimeLog=1
68 | LiveEnabled=0
69 | LiveFile=PowerLogLive.log
70 | [DataLog]
71 | LogEnabled=0
72 | GraphEnabled=0
73 | ShowTimeLog=1
74 | SumEnabled=0
75 | ShowTimeSum=1
76 | [EventLog]
77 | Title_0=Ch3
78 | Symbol_0=0 4 1
79 | Title_1=Ch2
80 | Symbol_1=0 4 1
81 | Title_2=Ch1
82 | Symbol_2=0 4 1
83 | Title_3=Ch0
84 | Symbol_3=0 4 1
85 | LogEnabled=0
86 | GraphEnabled=0
87 | ShowTimeLog=1
88 | SumEnabled=0
89 | ShowTimeSum=1
90 | SumSortOrder=0
91 | [InterruptLog]
92 | LogEnabled=0
93 | GraphEnabled=0
94 | ShowTimeLog=1
95 | SumEnabled=0
96 | ShowTimeSum=1
97 | SumSortOrder=0
98 | [Log file]
99 | LoggingEnabled=_ 0
100 | LogFile=_ ""
101 | Category=_ 0
102 | [TermIOLog]
103 | LoggingEnabled=_ 0
104 | LogFile=_ ""
105 | [DriverProfiling]
106 | Enabled=0
107 | Mode=1
108 | Graph=0
109 | Symbiont=0
110 | Exclusions=
111 | [CallStackLog]
112 | Enabled=0
113 | [CallStackStripe]
114 | ShowTiming=1
115 | [PowerProbe]
116 | Frequency=10000
117 | Probe0=I0
118 | ProbeSetup0=2 1 1 2 0 0
119 | [Disassemble mode]
120 | mode=0
121 | [Breakpoints2]
122 | Count=0
123 | [Aliases]
124 | Count=0
125 | SuppressDialog=0
126 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.wsdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | CrabVMS/CR4101
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 344272727
16 |
17 | 239132436053562566251251856664941138
18 |
19 |
20 |
21 |
22 |
23 | TabID-22592-26362
24 | Workspace
25 | Workspace
26 |
27 |
28 | CrabVMSCrabVMS/APPCrabVMS/BoardCrabVMS/Board/CR4101CrabVMS/CrabCrabVMS/Crab-LibCrabVMS/Crab/CoreCrabVMS/Crab/Core/incCrabVMS/Crab/Core/portCrabVMS/Crab/PlatformCrabVMS/Crab/Platform/incCrabVMS/Crab/Platform/srcCrabVMS/Crab/Platform/src/STM32CrabVMS/Crab/VMSCrabVMS/Crab/VMS/incCrabVMS/Crab/VMS/srcCrabVMS/OutputCrabVMS/ST-LIBRARIES
29 |
30 |
31 |
32 | 0TabID-22634-30046BuildBuildTabID-9023-28381Find in FilesFind-in-FilesTabID-14437-11398Debug LogDebug-LogTabID-29874-18513Ambiguous DefinitionsSelect-Ambiguous-Definitions0
33 |
34 |
35 |
36 |
37 |
38 | TextEditor$WS_DIR$\..\System\main.c000000384384TextEditor$WS_DIR$\..\Platform\CrabHardware.h000002818981917TextEditor$WS_DIR$\..\Platform\CrabHardware.c000007129592959TextEditor$WS_DIR$\..\Board\CR4101\Hardware.h000002413201330TextEditor$WS_DIR$\..\Platform\CrabUserApp.h000000571571TextEditor$WS_DIR$\..\Platform\CrabUserApp.c00000011331133TextEditor$WS_DIR$\..\Platform\CrabEvent.c000001518731873TextEditor$WS_DIR$\..\Core\Inc\CrabFifo.h00000710321032TextEditor$WS_DIR$\..\VMS\CrabSystem.h000004492492TextEditor$WS_DIR$\..\VMS\CrabSystem.c000002455365536TextEditor$WS_DIR$\..\VMS\CrabApplication.c00000191687168710TextEditor$WS_DIR$\..\Core\Inc\CrabExecute.h000009826826TextEditor$WS_DIR$\..\RTOS\FreeRTOS\v8.2.3\tasks.c0000030131025451025450100000010000001
39 |
40 |
41 |
42 |
43 |
44 |
45 | iaridepm.enu1-2-2778435-2-214814077083140281227604781563-2-21751922-2-21924177100208317735577083140281
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS.wspos:
--------------------------------------------------------------------------------
1 | [MainWindow]
2 | WindowPlacement=_ 125 125 1085 843 3
3 |
--------------------------------------------------------------------------------
/VMS/Project/settings/CrabVMS_CR4101.jlink:
--------------------------------------------------------------------------------
1 | [BREAKPOINTS]
2 | ForceImpTypeAny = 0
3 | ShowInfoWin = 1
4 | EnableFlashBP = 2
5 | BPDuringExecution = 0
6 | [CFI]
7 | CFISize = 0x00
8 | CFIAddr = 0x00
9 | [CPU]
10 | MonModeVTableAddr = 0xFFFFFFFF
11 | MonModeDebug = 0
12 | MaxNumAPs = 0
13 | LowPowerHandlingMode = 0
14 | OverrideMemMap = 0
15 | AllowSimulation = 1
16 | ScriptFile=""
17 | [FLASH]
18 | CacheExcludeSize = 0x00
19 | CacheExcludeAddr = 0x00
20 | MinNumBytesFlashDL = 0
21 | SkipProgOnCRCMatch = 1
22 | VerifyDownload = 1
23 | AllowCaching = 1
24 | EnableFlashDL = 2
25 | Override = 0
26 | Device="ARM7"
27 | [GENERAL]
28 | WorkRAMSize = 0x00
29 | WorkRAMAddr = 0x00
30 | RAMUsageLimit = 0x00
31 | [SWO]
32 | SWOLogFile=""
33 | [MEM]
34 | RdOverrideOrMask = 0x00
35 | RdOverrideAndMask = 0xFFFFFFFF
36 | RdOverrideAddr = 0xFFFFFFFF
37 | WrOverrideOrMask = 0x00
38 | WrOverrideAndMask = 0xFFFFFFFF
39 | WrOverrideAddr = 0xFFFFFFFF
40 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/include/stdint.readme:
--------------------------------------------------------------------------------
1 |
2 | #ifndef FREERTOS_STDINT
3 | #define FREERTOS_STDINT
4 |
5 | /*******************************************************************************
6 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions
7 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be
8 | * built using compilers that do not provide their own stdint.h definition.
9 | *
10 | * To use this file:
11 | *
12 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h
13 | * header file, as that directory will already be in the compilers include
14 | * path.
15 | *
16 | * 2) Rename the copied file stdint.h.
17 | *
18 | */
19 |
20 | typedef signed char int8_t;
21 | typedef unsigned char uint8_t;
22 | typedef short int16_t;
23 | typedef unsigned short uint16_t;
24 | typedef long int32_t;
25 | typedef unsigned long uint32_t;
26 |
27 | #endif /* FREERTOS_STDINT */
28 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/GCC/ARM_CM7/ReadMe.txt:
--------------------------------------------------------------------------------
1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers.
2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The
3 | revision is specified by an 'r' number, and a 'p' number, so will look something
4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the
5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use
6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used
7 | with all core revisions.
8 |
9 | The first option is to use the ARM Cortex-M4F port, and the second option is to
10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround.
11 |
12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be
13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in
14 | the /FreeRTOS/Source/portable/GCC/ARM_CM4F directory.
15 |
16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM
17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1
18 | directory.
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/IAR/ARM_CM3/portasm.s:
--------------------------------------------------------------------------------
1 | /*
2 | FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
3 | All rights reserved
4 |
5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 |
7 | This file is part of the FreeRTOS distribution.
8 |
9 | FreeRTOS is free software; you can redistribute it and/or modify it under
10 | the terms of the GNU General Public License (version 2) as published by the
11 | Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
12 |
13 | ***************************************************************************
14 | >>! NOTE: The modification to the GPL is included to allow you to !<<
15 | >>! distribute a combined work that includes FreeRTOS without being !<<
16 | >>! obliged to provide the source code for proprietary components !<<
17 | >>! outside of the FreeRTOS kernel. !<<
18 | ***************************************************************************
19 |
20 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | FOR A PARTICULAR PURPOSE. Full license text is available on the following
23 | link: http://www.freertos.org/a00114.html
24 |
25 | ***************************************************************************
26 | * *
27 | * FreeRTOS provides completely free yet professionally developed, *
28 | * robust, strictly quality controlled, supported, and cross *
29 | * platform software that is more than just the market leader, it *
30 | * is the industry's de facto standard. *
31 | * *
32 | * Help yourself get started quickly while simultaneously helping *
33 | * to support the FreeRTOS project by purchasing a FreeRTOS *
34 | * tutorial book, reference manual, or both: *
35 | * http://www.FreeRTOS.org/Documentation *
36 | * *
37 | ***************************************************************************
38 |
39 | http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40 | the FAQ page "My application does not run, what could be wrong?". Have you
41 | defined configASSERT()?
42 |
43 | http://www.FreeRTOS.org/support - In return for receiving this top quality
44 | embedded software for free we request you assist our global community by
45 | participating in the support forum.
46 |
47 | http://www.FreeRTOS.org/training - Investing in training allows your team to
48 | be as productive as possible as early as possible. Now you can receive
49 | FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50 | Ltd, and the world's leading authority on the world's leading RTOS.
51 |
52 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54 | compatible FAT file system, and our tiny thread aware UDP/IP stack.
55 |
56 | http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57 | Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
58 |
59 | http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60 | Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61 | licenses offer ticketed support, indemnification and commercial middleware.
62 |
63 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64 | engineered and independently SIL3 certified version for use in safety and
65 | mission critical applications that require provable dependability.
66 |
67 | 1 tab == 4 spaces!
68 | */
69 |
70 | #include
71 |
72 | RSEG CODE:CODE(2)
73 | thumb
74 |
75 | EXTERN pxCurrentTCB
76 | EXTERN vTaskSwitchContext
77 |
78 | PUBLIC xPortPendSVHandler
79 | PUBLIC ulPortSetInterruptMask
80 | PUBLIC vPortClearInterruptMask
81 | PUBLIC vPortSVCHandler
82 | PUBLIC vPortStartFirstTask
83 |
84 |
85 |
86 | /*-----------------------------------------------------------*/
87 |
88 | xPortPendSVHandler:
89 | mrs r0, psp
90 | isb
91 | ldr r3, =pxCurrentTCB /* Get the location of the current TCB. */
92 | ldr r2, [r3]
93 |
94 | stmdb r0!, {r4-r11} /* Save the remaining registers. */
95 | str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
96 |
97 | stmdb sp!, {r3, r14}
98 | mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
99 | msr basepri, r0
100 | bl vTaskSwitchContext
101 | mov r0, #0
102 | msr basepri, r0
103 | ldmia sp!, {r3, r14}
104 |
105 | ldr r1, [r3]
106 | ldr r0, [r1] /* The first item in pxCurrentTCB is the task top of stack. */
107 | ldmia r0!, {r4-r11} /* Pop the registers. */
108 | msr psp, r0
109 | isb
110 | bx r14
111 |
112 |
113 | /*-----------------------------------------------------------*/
114 |
115 | ulPortSetInterruptMask:
116 | mrs r0, basepri
117 | mov r1, #configMAX_SYSCALL_INTERRUPT_PRIORITY
118 | msr basepri, r1
119 | bx r14
120 |
121 | /*-----------------------------------------------------------*/
122 |
123 | vPortClearInterruptMask:
124 | msr basepri, r0
125 | bx r14
126 |
127 | /*-----------------------------------------------------------*/
128 |
129 | vPortSVCHandler:
130 | /* Get the location of the current TCB. */
131 | ldr r3, =pxCurrentTCB
132 | ldr r1, [r3]
133 | ldr r0, [r1]
134 | /* Pop the core registers. */
135 | ldmia r0!, {r4-r11}
136 | msr psp, r0
137 | isb
138 | mov r0, #0
139 | msr basepri, r0
140 | orr r14, r14, #13
141 | bx r14
142 |
143 | /*-----------------------------------------------------------*/
144 |
145 | vPortStartFirstTask
146 | /* Use the NVIC offset register to locate the stack. */
147 | ldr r0, =0xE000ED08
148 | ldr r0, [r0]
149 | ldr r0, [r0]
150 | /* Set the msp back to the start of the stack. */
151 | msr msp, r0
152 | /* Call SVC to start the first task, ensuring interrupts are enabled. */
153 | cpsie i
154 | cpsie f
155 | dsb
156 | isb
157 | svc 0
158 |
159 | END
160 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/IAR/ARM_CM4F/portasm.s:
--------------------------------------------------------------------------------
1 | /*
2 | FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
3 | All rights reserved
4 |
5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 |
7 | This file is part of the FreeRTOS distribution.
8 |
9 | FreeRTOS is free software; you can redistribute it and/or modify it under
10 | the terms of the GNU General Public License (version 2) as published by the
11 | Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
12 |
13 | ***************************************************************************
14 | >>! NOTE: The modification to the GPL is included to allow you to !<<
15 | >>! distribute a combined work that includes FreeRTOS without being !<<
16 | >>! obliged to provide the source code for proprietary components !<<
17 | >>! outside of the FreeRTOS kernel. !<<
18 | ***************************************************************************
19 |
20 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | FOR A PARTICULAR PURPOSE. Full license text is available on the following
23 | link: http://www.freertos.org/a00114.html
24 |
25 | ***************************************************************************
26 | * *
27 | * FreeRTOS provides completely free yet professionally developed, *
28 | * robust, strictly quality controlled, supported, and cross *
29 | * platform software that is more than just the market leader, it *
30 | * is the industry's de facto standard. *
31 | * *
32 | * Help yourself get started quickly while simultaneously helping *
33 | * to support the FreeRTOS project by purchasing a FreeRTOS *
34 | * tutorial book, reference manual, or both: *
35 | * http://www.FreeRTOS.org/Documentation *
36 | * *
37 | ***************************************************************************
38 |
39 | http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40 | the FAQ page "My application does not run, what could be wrong?". Have you
41 | defined configASSERT()?
42 |
43 | http://www.FreeRTOS.org/support - In return for receiving this top quality
44 | embedded software for free we request you assist our global community by
45 | participating in the support forum.
46 |
47 | http://www.FreeRTOS.org/training - Investing in training allows your team to
48 | be as productive as possible as early as possible. Now you can receive
49 | FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50 | Ltd, and the world's leading authority on the world's leading RTOS.
51 |
52 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54 | compatible FAT file system, and our tiny thread aware UDP/IP stack.
55 |
56 | http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57 | Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
58 |
59 | http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60 | Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61 | licenses offer ticketed support, indemnification and commercial middleware.
62 |
63 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64 | engineered and independently SIL3 certified version for use in safety and
65 | mission critical applications that require provable dependability.
66 |
67 | 1 tab == 4 spaces!
68 | */
69 |
70 | #include
71 |
72 | RSEG CODE:CODE(2)
73 | thumb
74 |
75 | EXTERN pxCurrentTCB
76 | EXTERN vTaskSwitchContext
77 |
78 | PUBLIC xPortPendSVHandler
79 | PUBLIC vPortSVCHandler
80 | PUBLIC vPortStartFirstTask
81 | PUBLIC vPortEnableVFP
82 |
83 |
84 | /*-----------------------------------------------------------*/
85 |
86 | xPortPendSVHandler:
87 | mrs r0, psp
88 | isb
89 | /* Get the location of the current TCB. */
90 | ldr r3, =pxCurrentTCB
91 | ldr r2, [r3]
92 |
93 | /* Is the task using the FPU context? If so, push high vfp registers. */
94 | tst r14, #0x10
95 | it eq
96 | vstmdbeq r0!, {s16-s31}
97 |
98 | /* Save the core registers. */
99 | stmdb r0!, {r4-r11, r14}
100 |
101 | /* Save the new top of stack into the first member of the TCB. */
102 | str r0, [r2]
103 |
104 | stmdb sp!, {r3}
105 | mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
106 | msr basepri, r0
107 | dsb
108 | isb
109 | bl vTaskSwitchContext
110 | mov r0, #0
111 | msr basepri, r0
112 | ldmia sp!, {r3}
113 |
114 | /* The first item in pxCurrentTCB is the task top of stack. */
115 | ldr r1, [r3]
116 | ldr r0, [r1]
117 |
118 | /* Pop the core registers. */
119 | ldmia r0!, {r4-r11, r14}
120 |
121 | /* Is the task using the FPU context? If so, pop the high vfp registers
122 | too. */
123 | tst r14, #0x10
124 | it eq
125 | vldmiaeq r0!, {s16-s31}
126 |
127 | msr psp, r0
128 | isb
129 | #ifdef WORKAROUND_PMU_CM001 /* XMC4000 specific errata */
130 | #if WORKAROUND_PMU_CM001 == 1
131 | push { r14 }
132 | pop { pc }
133 | #endif
134 | #endif
135 |
136 | bx r14
137 |
138 |
139 | /*-----------------------------------------------------------*/
140 |
141 | vPortSVCHandler:
142 | /* Get the location of the current TCB. */
143 | ldr r3, =pxCurrentTCB
144 | ldr r1, [r3]
145 | ldr r0, [r1]
146 | /* Pop the core registers. */
147 | ldmia r0!, {r4-r11, r14}
148 | msr psp, r0
149 | isb
150 | mov r0, #0
151 | msr basepri, r0
152 | bx r14
153 |
154 | /*-----------------------------------------------------------*/
155 |
156 | vPortStartFirstTask
157 | /* Use the NVIC offset register to locate the stack. */
158 | ldr r0, =0xE000ED08
159 | ldr r0, [r0]
160 | ldr r0, [r0]
161 | /* Set the msp back to the start of the stack. */
162 | msr msp, r0
163 | /* Call SVC to start the first task. */
164 | cpsie i
165 | cpsie f
166 | dsb
167 | isb
168 | svc 0
169 |
170 | /*-----------------------------------------------------------*/
171 |
172 | vPortEnableVFP:
173 | /* The FPU enable bits are in the CPACR. */
174 | ldr.w r0, =0xE000ED88
175 | ldr r1, [r0]
176 |
177 | /* Enable CP10 and CP11 coprocessors, then save back. */
178 | orr r1, r1, #( 0xf << 20 )
179 | str r1, [r0]
180 | bx r14
181 |
182 |
183 |
184 | END
185 |
186 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/IAR/ARM_CM7/ReadMe.txt:
--------------------------------------------------------------------------------
1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers.
2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The
3 | revision is specified by an 'r' number, and a 'p' number, so will look something
4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the
5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use
6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used
7 | with all core revisions.
8 |
9 | The first option is to use the ARM Cortex-M4F port, and the second option is to
10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround.
11 |
12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be
13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in
14 | the /FreeRTOS/Source/portable/IAR/ARM_CM4F directory.
15 |
16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM
17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1
18 | directory.
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/IAR/ARM_CM7/r0p1/portasm.s:
--------------------------------------------------------------------------------
1 | /*
2 | FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
3 | All rights reserved
4 |
5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 |
7 | This file is part of the FreeRTOS distribution.
8 |
9 | FreeRTOS is free software; you can redistribute it and/or modify it under
10 | the terms of the GNU General Public License (version 2) as published by the
11 | Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
12 |
13 | ***************************************************************************
14 | >>! NOTE: The modification to the GPL is included to allow you to !<<
15 | >>! distribute a combined work that includes FreeRTOS without being !<<
16 | >>! obliged to provide the source code for proprietary components !<<
17 | >>! outside of the FreeRTOS kernel. !<<
18 | ***************************************************************************
19 |
20 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | FOR A PARTICULAR PURPOSE. Full license text is available on the following
23 | link: http://www.freertos.org/a00114.html
24 |
25 | ***************************************************************************
26 | * *
27 | * FreeRTOS provides completely free yet professionally developed, *
28 | * robust, strictly quality controlled, supported, and cross *
29 | * platform software that is more than just the market leader, it *
30 | * is the industry's de facto standard. *
31 | * *
32 | * Help yourself get started quickly while simultaneously helping *
33 | * to support the FreeRTOS project by purchasing a FreeRTOS *
34 | * tutorial book, reference manual, or both: *
35 | * http://www.FreeRTOS.org/Documentation *
36 | * *
37 | ***************************************************************************
38 |
39 | http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40 | the FAQ page "My application does not run, what could be wrong?". Have you
41 | defined configASSERT()?
42 |
43 | http://www.FreeRTOS.org/support - In return for receiving this top quality
44 | embedded software for free we request you assist our global community by
45 | participating in the support forum.
46 |
47 | http://www.FreeRTOS.org/training - Investing in training allows your team to
48 | be as productive as possible as early as possible. Now you can receive
49 | FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50 | Ltd, and the world's leading authority on the world's leading RTOS.
51 |
52 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54 | compatible FAT file system, and our tiny thread aware UDP/IP stack.
55 |
56 | http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57 | Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
58 |
59 | http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60 | Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61 | licenses offer ticketed support, indemnification and commercial middleware.
62 |
63 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64 | engineered and independently SIL3 certified version for use in safety and
65 | mission critical applications that require provable dependability.
66 |
67 | 1 tab == 4 spaces!
68 | */
69 |
70 | #include
71 |
72 | RSEG CODE:CODE(2)
73 | thumb
74 |
75 | EXTERN pxCurrentTCB
76 | EXTERN vTaskSwitchContext
77 |
78 | PUBLIC xPortPendSVHandler
79 | PUBLIC vPortSVCHandler
80 | PUBLIC vPortStartFirstTask
81 | PUBLIC vPortEnableVFP
82 |
83 |
84 | /*-----------------------------------------------------------*/
85 |
86 | xPortPendSVHandler:
87 | mrs r0, psp
88 | isb
89 | /* Get the location of the current TCB. */
90 | ldr r3, =pxCurrentTCB
91 | ldr r2, [r3]
92 |
93 | /* Is the task using the FPU context? If so, push high vfp registers. */
94 | tst r14, #0x10
95 | it eq
96 | vstmdbeq r0!, {s16-s31}
97 |
98 | /* Save the core registers. */
99 | stmdb r0!, {r4-r11, r14}
100 |
101 | /* Save the new top of stack into the first member of the TCB. */
102 | str r0, [r2]
103 |
104 | stmdb sp!, {r3}
105 | mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
106 | cpsid i
107 | msr basepri, r0
108 | dsb
109 | isb
110 | cpsie i
111 | bl vTaskSwitchContext
112 | mov r0, #0
113 | msr basepri, r0
114 | ldmia sp!, {r3}
115 |
116 | /* The first item in pxCurrentTCB is the task top of stack. */
117 | ldr r1, [r3]
118 | ldr r0, [r1]
119 |
120 | /* Pop the core registers. */
121 | ldmia r0!, {r4-r11, r14}
122 |
123 | /* Is the task using the FPU context? If so, pop the high vfp registers
124 | too. */
125 | tst r14, #0x10
126 | it eq
127 | vldmiaeq r0!, {s16-s31}
128 |
129 | msr psp, r0
130 | isb
131 | #ifdef WORKAROUND_PMU_CM001 /* XMC4000 specific errata */
132 | #if WORKAROUND_PMU_CM001 == 1
133 | push { r14 }
134 | pop { pc }
135 | #endif
136 | #endif
137 |
138 | bx r14
139 |
140 |
141 | /*-----------------------------------------------------------*/
142 |
143 | vPortSVCHandler:
144 | /* Get the location of the current TCB. */
145 | ldr r3, =pxCurrentTCB
146 | ldr r1, [r3]
147 | ldr r0, [r1]
148 | /* Pop the core registers. */
149 | ldmia r0!, {r4-r11, r14}
150 | msr psp, r0
151 | isb
152 | mov r0, #0
153 | msr basepri, r0
154 | bx r14
155 |
156 | /*-----------------------------------------------------------*/
157 |
158 | vPortStartFirstTask
159 | /* Use the NVIC offset register to locate the stack. */
160 | ldr r0, =0xE000ED08
161 | ldr r0, [r0]
162 | ldr r0, [r0]
163 | /* Set the msp back to the start of the stack. */
164 | msr msp, r0
165 | /* Call SVC to start the first task. */
166 | cpsie i
167 | cpsie f
168 | dsb
169 | isb
170 | svc 0
171 |
172 | /*-----------------------------------------------------------*/
173 |
174 | vPortEnableVFP:
175 | /* The FPU enable bits are in the CPACR. */
176 | ldr.w r0, =0xE000ED88
177 | ldr r1, [r0]
178 |
179 | /* Enable CP10 and CP11 coprocessors, then save back. */
180 | orr r1, r1, #( 0xf << 20 )
181 | str r1, [r0]
182 | bx r14
183 |
184 |
185 |
186 | END
187 |
188 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/Keil/See-also-the-RVDS-directory.txt:
--------------------------------------------------------------------------------
1 | Nothing to see here.
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/portable/MemMang/heap_3.c:
--------------------------------------------------------------------------------
1 | /*
2 | FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
3 | All rights reserved
4 |
5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 |
7 | This file is part of the FreeRTOS distribution.
8 |
9 | FreeRTOS is free software; you can redistribute it and/or modify it under
10 | the terms of the GNU General Public License (version 2) as published by the
11 | Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
12 |
13 | ***************************************************************************
14 | >>! NOTE: The modification to the GPL is included to allow you to !<<
15 | >>! distribute a combined work that includes FreeRTOS without being !<<
16 | >>! obliged to provide the source code for proprietary components !<<
17 | >>! outside of the FreeRTOS kernel. !<<
18 | ***************************************************************************
19 |
20 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 | FOR A PARTICULAR PURPOSE. Full license text is available on the following
23 | link: http://www.freertos.org/a00114.html
24 |
25 | ***************************************************************************
26 | * *
27 | * FreeRTOS provides completely free yet professionally developed, *
28 | * robust, strictly quality controlled, supported, and cross *
29 | * platform software that is more than just the market leader, it *
30 | * is the industry's de facto standard. *
31 | * *
32 | * Help yourself get started quickly while simultaneously helping *
33 | * to support the FreeRTOS project by purchasing a FreeRTOS *
34 | * tutorial book, reference manual, or both: *
35 | * http://www.FreeRTOS.org/Documentation *
36 | * *
37 | ***************************************************************************
38 |
39 | http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40 | the FAQ page "My application does not run, what could be wrong?". Have you
41 | defined configASSERT()?
42 |
43 | http://www.FreeRTOS.org/support - In return for receiving this top quality
44 | embedded software for free we request you assist our global community by
45 | participating in the support forum.
46 |
47 | http://www.FreeRTOS.org/training - Investing in training allows your team to
48 | be as productive as possible as early as possible. Now you can receive
49 | FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50 | Ltd, and the world's leading authority on the world's leading RTOS.
51 |
52 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54 | compatible FAT file system, and our tiny thread aware UDP/IP stack.
55 |
56 | http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57 | Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
58 |
59 | http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60 | Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61 | licenses offer ticketed support, indemnification and commercial middleware.
62 |
63 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64 | engineered and independently SIL3 certified version for use in safety and
65 | mission critical applications that require provable dependability.
66 |
67 | 1 tab == 4 spaces!
68 | */
69 |
70 |
71 | /*
72 | * Implementation of pvPortMalloc() and vPortFree() that relies on the
73 | * compilers own malloc() and free() implementations.
74 | *
75 | * This file can only be used if the linker is configured to to generate
76 | * a heap memory area.
77 | *
78 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the
79 | * memory management pages of http://www.FreeRTOS.org for more information.
80 | */
81 |
82 | #include
83 |
84 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
85 | all the API functions to use the MPU wrappers. That should only be done when
86 | task.h is included from an application file. */
87 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
88 |
89 | #include "FreeRTOS.h"
90 | #include "task.h"
91 |
92 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
93 |
94 | /*-----------------------------------------------------------*/
95 |
96 | void *pvPortMalloc( size_t xWantedSize )
97 | {
98 | void *pvReturn;
99 |
100 | vTaskSuspendAll();
101 | {
102 | pvReturn = malloc( xWantedSize );
103 | traceMALLOC( pvReturn, xWantedSize );
104 | }
105 | ( void ) xTaskResumeAll();
106 |
107 | #if( configUSE_MALLOC_FAILED_HOOK == 1 )
108 | {
109 | if( pvReturn == NULL )
110 | {
111 | extern void vApplicationMallocFailedHook( void );
112 | vApplicationMallocFailedHook();
113 | }
114 | }
115 | #endif
116 |
117 | return pvReturn;
118 | }
119 | /*-----------------------------------------------------------*/
120 |
121 | void vPortFree( void *pv )
122 | {
123 | if( pv )
124 | {
125 | vTaskSuspendAll();
126 | {
127 | free( pv );
128 | traceFREE( pv, 0 );
129 | }
130 | ( void ) xTaskResumeAll();
131 | }
132 | }
133 |
134 |
135 |
136 |
--------------------------------------------------------------------------------
/VMS/RTOS/FreeRTOS/v8.2.3/readme.txt:
--------------------------------------------------------------------------------
1 | Each real time kernel port consists of three files that contain the core kernel
2 | components and are common to every port, and one or more files that are
3 | specific to a particular microcontroller and or compiler.
4 |
5 | + The FreeRTOS/Source directory contains the three files that are common to
6 | every port - list.c, queue.c and tasks.c. The kernel is contained within these
7 | three files. croutine.c implements the optional co-routine functionality - which
8 | is normally only used on very memory limited systems.
9 |
10 | + The FreeRTOS/Source/Portable directory contains the files that are specific to
11 | a particular microcontroller and or compiler.
12 |
13 | + The FreeRTOS/Source/include directory contains the real time kernel header
14 | files.
15 |
16 | See the readme file in the FreeRTOS/Source/Portable directory for more
17 | information.
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2015 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_CRC_H
31 | #define __STM32F4xx_CRC_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup CRC
45 | * @{
46 | */
47 |
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Exported constants --------------------------------------------------------*/
50 |
51 | /** @defgroup CRC_Exported_Constants
52 | * @{
53 | */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /* Exported macro ------------------------------------------------------------*/
60 | /* Exported functions --------------------------------------------------------*/
61 |
62 | void CRC_ResetDR(void);
63 | uint32_t CRC_CalcCRC(uint32_t Data);
64 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
65 | uint32_t CRC_GetCRC(void);
66 | void CRC_SetIDRegister(uint8_t IDValue);
67 | uint8_t CRC_GetIDRegister(void);
68 |
69 | #ifdef __cplusplus
70 | }
71 | #endif
72 |
73 | #endif /* __STM32F4xx_CRC_H */
74 |
75 | /**
76 | * @}
77 | */
78 |
79 | /**
80 | * @}
81 | */
82 |
83 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
84 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_dbgmcu.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_dbgmcu.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the DBGMCU firmware library.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __STM32F4xx_DBGMCU_H
30 | #define __STM32F4xx_DBGMCU_H
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | /* Includes ------------------------------------------------------------------*/
37 | #include "stm32f4xx.h"
38 |
39 | /** @addtogroup STM32F4xx_StdPeriph_Driver
40 | * @{
41 | */
42 |
43 | /** @addtogroup DBGMCU
44 | * @{
45 | */
46 |
47 | /* Exported types ------------------------------------------------------------*/
48 | /* Exported constants --------------------------------------------------------*/
49 |
50 | /** @defgroup DBGMCU_Exported_Constants
51 | * @{
52 | */
53 | #define DBGMCU_SLEEP ((uint32_t)0x00000001)
54 | #define DBGMCU_STOP ((uint32_t)0x00000002)
55 | #define DBGMCU_STANDBY ((uint32_t)0x00000004)
56 | #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0xFFFFFFF8) == 0x00) && ((PERIPH) != 0x00))
57 |
58 | #define DBGMCU_TIM2_STOP ((uint32_t)0x00000001)
59 | #define DBGMCU_TIM3_STOP ((uint32_t)0x00000002)
60 | #define DBGMCU_TIM4_STOP ((uint32_t)0x00000004)
61 | #define DBGMCU_TIM5_STOP ((uint32_t)0x00000008)
62 | #define DBGMCU_TIM6_STOP ((uint32_t)0x00000010)
63 | #define DBGMCU_TIM7_STOP ((uint32_t)0x00000020)
64 | #define DBGMCU_TIM12_STOP ((uint32_t)0x00000040)
65 | #define DBGMCU_TIM13_STOP ((uint32_t)0x00000080)
66 | #define DBGMCU_TIM14_STOP ((uint32_t)0x00000100)
67 | #define DBGMCU_RTC_STOP ((uint32_t)0x00000400)
68 | #define DBGMCU_WWDG_STOP ((uint32_t)0x00000800)
69 | #define DBGMCU_IWDG_STOP ((uint32_t)0x00001000)
70 | #define DBGMCU_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00200000)
71 | #define DBGMCU_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00400000)
72 | #define DBGMCU_I2C3_SMBUS_TIMEOUT ((uint32_t)0x00800000)
73 | #define DBGMCU_CAN1_STOP ((uint32_t)0x02000000)
74 | #define DBGMCU_CAN2_STOP ((uint32_t)0x04000000)
75 | #define IS_DBGMCU_APB1PERIPH(PERIPH) ((((PERIPH) & 0xF91FE200) == 0x00) && ((PERIPH) != 0x00))
76 |
77 | #define DBGMCU_TIM1_STOP ((uint32_t)0x00000001)
78 | #define DBGMCU_TIM8_STOP ((uint32_t)0x00000002)
79 | #define DBGMCU_TIM9_STOP ((uint32_t)0x00010000)
80 | #define DBGMCU_TIM10_STOP ((uint32_t)0x00020000)
81 | #define DBGMCU_TIM11_STOP ((uint32_t)0x00040000)
82 | #define IS_DBGMCU_APB2PERIPH(PERIPH) ((((PERIPH) & 0xFFF8FFFC) == 0x00) && ((PERIPH) != 0x00))
83 | /**
84 | * @}
85 | */
86 |
87 | /* Exported macro ------------------------------------------------------------*/
88 | /* Exported functions --------------------------------------------------------*/
89 | uint32_t DBGMCU_GetREVID(void);
90 | uint32_t DBGMCU_GetDEVID(void);
91 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
92 | void DBGMCU_APB1PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);
93 | void DBGMCU_APB2PeriphConfig(uint32_t DBGMCU_Periph, FunctionalState NewState);
94 |
95 | #ifdef __cplusplus
96 | }
97 | #endif
98 |
99 | #endif /* __STM32F4xx_DBGMCU_H */
100 |
101 | /**
102 | * @}
103 | */
104 |
105 | /**
106 | * @}
107 | */
108 |
109 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
110 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_flash_ramfunc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_flash_ramfunc.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief Header file of FLASH RAMFUNC driver.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_FLASH_RAMFUNC_H
31 | #define __STM32F4xx_FLASH_RAMFUNC_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup FLASH RAMFUNC
45 | * @{
46 | */
47 |
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Private define ------------------------------------------------------------*/
50 | /**
51 | * @brief __RAM_FUNC definition
52 | */
53 | #if defined ( __CC_ARM )
54 | /* ARM Compiler
55 | ------------
56 | RAM functions are defined using the toolchain options.
57 | Functions that are executed in RAM should reside in a separate source module.
58 | Using the 'Options for File' dialog you can simply change the 'Code / Const'
59 | area of a module to a memory space in physical RAM.
60 | Available memory areas are declared in the 'Target' tab of the 'Options for Target'
61 | dialog.
62 | */
63 | #define __RAM_FUNC void
64 |
65 | #elif defined ( __ICCARM__ )
66 | /* ICCARM Compiler
67 | ---------------
68 | RAM functions are defined using a specific toolchain keyword "__ramfunc".
69 | */
70 | #define __RAM_FUNC __ramfunc void
71 |
72 | #elif defined ( __GNUC__ )
73 | /* GNU Compiler
74 | ------------
75 | RAM functions are defined using a specific toolchain attribute
76 | "__attribute__((section(".RamFunc")))".
77 | */
78 | #define __RAM_FUNC void __attribute__((section(".RamFunc")))
79 |
80 | #endif
81 | /* Exported constants --------------------------------------------------------*/
82 | /* Exported macro ------------------------------------------------------------*/
83 | /* Exported functions --------------------------------------------------------*/
84 | __RAM_FUNC FLASH_FlashInterfaceCmd(FunctionalState NewState);
85 | __RAM_FUNC FLASH_FlashSleepModeCmd(FunctionalState NewState);
86 |
87 |
88 | #ifdef __cplusplus
89 | }
90 | #endif
91 |
92 | #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
104 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_iwdg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_iwdg.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the IWDG
8 | * firmware library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2015 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_IWDG_H
31 | #define __STM32F4xx_IWDG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup IWDG
45 | * @{
46 | */
47 |
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Exported constants --------------------------------------------------------*/
50 |
51 | /** @defgroup IWDG_Exported_Constants
52 | * @{
53 | */
54 |
55 | /** @defgroup IWDG_WriteAccess
56 | * @{
57 | */
58 | #define IWDG_WriteAccess_Enable ((uint16_t)0x5555)
59 | #define IWDG_WriteAccess_Disable ((uint16_t)0x0000)
60 | #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
61 | ((ACCESS) == IWDG_WriteAccess_Disable))
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup IWDG_prescaler
67 | * @{
68 | */
69 | #define IWDG_Prescaler_4 ((uint8_t)0x00)
70 | #define IWDG_Prescaler_8 ((uint8_t)0x01)
71 | #define IWDG_Prescaler_16 ((uint8_t)0x02)
72 | #define IWDG_Prescaler_32 ((uint8_t)0x03)
73 | #define IWDG_Prescaler_64 ((uint8_t)0x04)
74 | #define IWDG_Prescaler_128 ((uint8_t)0x05)
75 | #define IWDG_Prescaler_256 ((uint8_t)0x06)
76 | #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
77 | ((PRESCALER) == IWDG_Prescaler_8) || \
78 | ((PRESCALER) == IWDG_Prescaler_16) || \
79 | ((PRESCALER) == IWDG_Prescaler_32) || \
80 | ((PRESCALER) == IWDG_Prescaler_64) || \
81 | ((PRESCALER) == IWDG_Prescaler_128)|| \
82 | ((PRESCALER) == IWDG_Prescaler_256))
83 | /**
84 | * @}
85 | */
86 |
87 | /** @defgroup IWDG_Flag
88 | * @{
89 | */
90 | #define IWDG_FLAG_PVU ((uint16_t)0x0001)
91 | #define IWDG_FLAG_RVU ((uint16_t)0x0002)
92 | #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU))
93 | #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
94 | /**
95 | * @}
96 | */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /* Exported macro ------------------------------------------------------------*/
103 | /* Exported functions --------------------------------------------------------*/
104 |
105 | /* Prescaler and Counter configuration functions ******************************/
106 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
107 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
108 | void IWDG_SetReload(uint16_t Reload);
109 | void IWDG_ReloadCounter(void);
110 |
111 | /* IWDG activation function ***************************************************/
112 | void IWDG_Enable(void);
113 |
114 | /* Flag management function ***************************************************/
115 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
116 |
117 | #ifdef __cplusplus
118 | }
119 | #endif
120 |
121 | #endif /* __STM32F4xx_IWDG_H */
122 |
123 | /**
124 | * @}
125 | */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
132 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_rng.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_rng.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the Random
8 | * Number Generator(RNG) firmware library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2015 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_RNG_H
31 | #define __STM32F4xx_RNG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup RNG
45 | * @{
46 | */
47 | #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F410xx) || defined(STM32F429_439xx) || defined(STM32F469_479xx)
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Exported constants --------------------------------------------------------*/
50 |
51 | /** @defgroup RNG_Exported_Constants
52 | * @{
53 | */
54 |
55 | /** @defgroup RNG_flags_definition
56 | * @{
57 | */
58 | #define RNG_FLAG_DRDY ((uint8_t)0x0001) /*!< Data ready */
59 | #define RNG_FLAG_CECS ((uint8_t)0x0002) /*!< Clock error current status */
60 | #define RNG_FLAG_SECS ((uint8_t)0x0004) /*!< Seed error current status */
61 |
62 | #define IS_RNG_GET_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_DRDY) || \
63 | ((RNG_FLAG) == RNG_FLAG_CECS) || \
64 | ((RNG_FLAG) == RNG_FLAG_SECS))
65 | #define IS_RNG_CLEAR_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_CECS) || \
66 | ((RNG_FLAG) == RNG_FLAG_SECS))
67 | /**
68 | * @}
69 | */
70 |
71 | /** @defgroup RNG_interrupts_definition
72 | * @{
73 | */
74 | #define RNG_IT_CEI ((uint8_t)0x20) /*!< Clock error interrupt */
75 | #define RNG_IT_SEI ((uint8_t)0x40) /*!< Seed error interrupt */
76 |
77 | #define IS_RNG_IT(IT) ((((IT) & (uint8_t)0x9F) == 0x00) && ((IT) != 0x00))
78 | #define IS_RNG_GET_IT(RNG_IT) (((RNG_IT) == RNG_IT_CEI) || ((RNG_IT) == RNG_IT_SEI))
79 | /**
80 | * @}
81 | */
82 |
83 | /**
84 | * @}
85 | */
86 |
87 | /* Exported macro ------------------------------------------------------------*/
88 | /* Exported functions --------------------------------------------------------*/
89 |
90 | /* Function used to set the RNG configuration to the default reset state *****/
91 | void RNG_DeInit(void);
92 |
93 | /* Configuration function *****************************************************/
94 | void RNG_Cmd(FunctionalState NewState);
95 |
96 | /* Get 32 bit Random number function ******************************************/
97 | uint32_t RNG_GetRandomNumber(void);
98 |
99 | /* Interrupts and flags management functions **********************************/
100 | void RNG_ITConfig(FunctionalState NewState);
101 | FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG);
102 | void RNG_ClearFlag(uint8_t RNG_FLAG);
103 | ITStatus RNG_GetITStatus(uint8_t RNG_IT);
104 | void RNG_ClearITPendingBit(uint8_t RNG_IT);
105 | #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F410xx || STM32F429_439xx || STM32F469_479xx */
106 |
107 | #ifdef __cplusplus
108 | }
109 | #endif
110 |
111 | #endif /*__STM32F4xx_RNG_H */
112 |
113 | /**
114 | * @}
115 | */
116 |
117 | /**
118 | * @}
119 | */
120 |
121 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
122 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/inc/stm32f4xx_wwdg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_wwdg.h
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file contains all the functions prototypes for the WWDG firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2015 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_WWDG_H
31 | #define __STM32F4xx_WWDG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup WWDG
45 | * @{
46 | */
47 |
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Exported constants --------------------------------------------------------*/
50 |
51 | /** @defgroup WWDG_Exported_Constants
52 | * @{
53 | */
54 |
55 | /** @defgroup WWDG_Prescaler
56 | * @{
57 | */
58 |
59 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
60 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
61 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
62 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
63 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
64 | ((PRESCALER) == WWDG_Prescaler_2) || \
65 | ((PRESCALER) == WWDG_Prescaler_4) || \
66 | ((PRESCALER) == WWDG_Prescaler_8))
67 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
68 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /**
75 | * @}
76 | */
77 |
78 | /* Exported macro ------------------------------------------------------------*/
79 | /* Exported functions --------------------------------------------------------*/
80 |
81 | /* Function used to set the WWDG configuration to the default reset state ****/
82 | void WWDG_DeInit(void);
83 |
84 | /* Prescaler, Refresh window and Counter configuration functions **************/
85 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
86 | void WWDG_SetWindowValue(uint8_t WindowValue);
87 | void WWDG_EnableIT(void);
88 | void WWDG_SetCounter(uint8_t Counter);
89 |
90 | /* WWDG activation function ***************************************************/
91 | void WWDG_Enable(uint8_t Counter);
92 |
93 | /* Interrupts and flags management functions **********************************/
94 | FlagStatus WWDG_GetFlagStatus(void);
95 | void WWDG_ClearFlag(void);
96 |
97 | #ifdef __cplusplus
98 | }
99 | #endif
100 |
101 | #endif /* __STM32F4xx_WWDG_H */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
112 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/src/stm32f4xx_crc.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.c
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief This file provides all the CRC firmware functions.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_crc.h"
30 |
31 | /** @addtogroup STM32F4xx_StdPeriph_Driver
32 | * @{
33 | */
34 |
35 | /** @defgroup CRC
36 | * @brief CRC driver modules
37 | * @{
38 | */
39 |
40 | /* Private typedef -----------------------------------------------------------*/
41 | /* Private define ------------------------------------------------------------*/
42 | /* Private macro -------------------------------------------------------------*/
43 | /* Private variables ---------------------------------------------------------*/
44 | /* Private function prototypes -----------------------------------------------*/
45 | /* Private functions ---------------------------------------------------------*/
46 |
47 | /** @defgroup CRC_Private_Functions
48 | * @{
49 | */
50 |
51 | /**
52 | * @brief Resets the CRC Data register (DR).
53 | * @param None
54 | * @retval None
55 | */
56 | void CRC_ResetDR(void)
57 | {
58 | /* Reset CRC generator */
59 | CRC->CR = CRC_CR_RESET;
60 | }
61 |
62 | /**
63 | * @brief Computes the 32-bit CRC of a given data word(32-bit).
64 | * @param Data: data word(32-bit) to compute its CRC
65 | * @retval 32-bit CRC
66 | */
67 | uint32_t CRC_CalcCRC(uint32_t Data)
68 | {
69 | CRC->DR = Data;
70 |
71 | return (CRC->DR);
72 | }
73 |
74 | /**
75 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit).
76 | * @param pBuffer: pointer to the buffer containing the data to be computed
77 | * @param BufferLength: length of the buffer to be computed
78 | * @retval 32-bit CRC
79 | */
80 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength)
81 | {
82 | uint32_t index = 0;
83 |
84 | for(index = 0; index < BufferLength; index++)
85 | {
86 | CRC->DR = pBuffer[index];
87 | }
88 | return (CRC->DR);
89 | }
90 |
91 | /**
92 | * @brief Returns the current CRC value.
93 | * @param None
94 | * @retval 32-bit CRC
95 | */
96 | uint32_t CRC_GetCRC(void)
97 | {
98 | return (CRC->DR);
99 | }
100 |
101 | /**
102 | * @brief Stores a 8-bit data in the Independent Data(ID) register.
103 | * @param IDValue: 8-bit value to be stored in the ID register
104 | * @retval None
105 | */
106 | void CRC_SetIDRegister(uint8_t IDValue)
107 | {
108 | CRC->IDR = IDValue;
109 | }
110 |
111 | /**
112 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register
113 | * @param None
114 | * @retval 8-bit value of the ID register
115 | */
116 | uint8_t CRC_GetIDRegister(void)
117 | {
118 | return (CRC->IDR);
119 | }
120 |
121 | /**
122 | * @}
123 | */
124 |
125 | /**
126 | * @}
127 | */
128 |
129 | /**
130 | * @}
131 | */
132 |
133 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
134 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/src/stm32f4xx_flash_ramfunc.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_flash_ramfunc.c
4 | * @author MCD Application Team
5 | * @version V1.6.0
6 | * @date 10-July-2015
7 | * @brief FLASH RAMFUNC module driver.
8 | * This file provides a FLASH firmware functions which should be
9 | * executed from internal SRAM
10 | * + Stop/Start the flash interface while System Run
11 | * + Enable/Disable the flash sleep while System Run
12 | *
13 | @verbatim
14 | ==============================================================================
15 | ##### APIs executed from Internal RAM #####
16 | ==============================================================================
17 | [..]
18 | *** ARM Compiler ***
19 | --------------------
20 | [..] RAM functions are defined using the toolchain options.
21 | Functions that are be executed in RAM should reside in a separate
22 | source module. Using the 'Options for File' dialog you can simply change
23 | the 'Code / Const' area of a module to a memory space in physical RAM.
24 | Available memory areas are declared in the 'Target' tab of the
25 | Options for Target' dialog.
26 |
27 | *** ICCARM Compiler ***
28 | -----------------------
29 | [..] RAM functions are defined using a specific toolchain keyword "__ramfunc".
30 |
31 | *** GNU Compiler ***
32 | --------------------
33 | [..] RAM functions are defined using a specific toolchain attribute
34 | "__attribute__((section(".RamFunc")))".
35 |
36 | @endverbatim
37 | ******************************************************************************
38 | * @attention
39 | *
40 | * © COPYRIGHT 2015 STMicroelectronics
41 | *
42 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
43 | * You may not use this file except in compliance with the License.
44 | * You may obtain a copy of the License at:
45 | *
46 | * http://www.st.com/software_license_agreement_liberty_v2
47 | *
48 | * Unless required by applicable law or agreed to in writing, software
49 | * distributed under the License is distributed on an "AS IS" BASIS,
50 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51 | * See the License for the specific language governing permissions and
52 | * limitations under the License.
53 | *
54 | ******************************************************************************
55 | */
56 |
57 | /* Includes ------------------------------------------------------------------*/
58 | #include "stm32f4xx_flash_ramfunc.h"
59 |
60 | /** @addtogroup STM32F4xx_StdPeriph_Driver
61 | * @{
62 | */
63 |
64 | /** @defgroup FLASH RAMFUNC
65 | * @brief FLASH RAMFUNC driver modules
66 | * @{
67 | */
68 |
69 | /* Private typedef -----------------------------------------------------------*/
70 | /* Private define ------------------------------------------------------------*/
71 | /* Private macro -------------------------------------------------------------*/
72 | /* Private variables ---------------------------------------------------------*/
73 | /* Private function prototypes -----------------------------------------------*/
74 | /* Private functions ---------------------------------------------------------*/
75 |
76 | /** @defgroup FLASH_RAMFUNC_Private_Functions
77 | * @{
78 | */
79 |
80 | /** @defgroup FLASH_RAMFUNC_Group1 Peripheral features functions executed from internal RAM
81 | * @brief Peripheral Extended features functions
82 | *
83 | @verbatim
84 |
85 | ===============================================================================
86 | ##### ramfunc functions #####
87 | ===============================================================================
88 | [..]
89 | This subsection provides a set of functions that should be executed from RAM
90 | transfers.
91 |
92 | @endverbatim
93 | * @{
94 | */
95 |
96 | /**
97 | * @brief Start/Stop the flash interface while System Run
98 | * @note This mode is only available for STM32F411xx devices.
99 | * @note This mode could n't be set while executing with the flash itself.
100 | * It should be done with specific routine executed from RAM.
101 | * @param NewState: new state of the Smart Card mode.
102 | * This parameter can be: ENABLE or DISABLE.
103 | * @retval None
104 | */
105 | __RAM_FUNC FLASH_FlashInterfaceCmd(FunctionalState NewState)
106 | {
107 | if (NewState != DISABLE)
108 | {
109 | /* Start the flash interface while System Run */
110 | CLEAR_BIT(PWR->CR, PWR_CR_FISSR);
111 | }
112 | else
113 | {
114 | /* Stop the flash interface while System Run */
115 | SET_BIT(PWR->CR, PWR_CR_FISSR);
116 | }
117 | }
118 |
119 | /**
120 | * @brief Enable/Disable the flash sleep while System Run
121 | * @note This mode is only available for STM32F411xx devices.
122 | * @note This mode could n't be set while executing with the flash itself.
123 | * It should be done with specific routine executed from RAM.
124 | * @param NewState: new state of the Smart Card mode.
125 | * This parameter can be: ENABLE or DISABLE.
126 | * @retval None
127 | */
128 | __RAM_FUNC FLASH_FlashSleepModeCmd(FunctionalState NewState)
129 | {
130 | if (NewState != DISABLE)
131 | {
132 | /* Enable the flash sleep while System Run */
133 | SET_BIT(PWR->CR, PWR_CR_FMSSR);
134 | }
135 | else
136 | {
137 | /* Disable the flash sleep while System Run */
138 | CLEAR_BIT(PWR->CR, PWR_CR_FMSSR);
139 | }
140 | }
141 |
142 | /**
143 | * @}
144 | */
145 |
146 | /**
147 | * @}
148 | */
149 |
150 | /**
151 | * @}
152 | */
153 |
154 | /**
155 | * @}
156 | */
157 |
158 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
159 |
--------------------------------------------------------------------------------
/VMS/ST/StdPeriph/src/stm32f4xx_qspi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/ST/StdPeriph/src/stm32f4xx_qspi.c
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf_template.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 30-June-2015
7 | * @brief usb device configuration template file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USBD_CONF__H__
30 | #define __USBD_CONF__H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usb_conf.h"
34 |
35 | /** @defgroup USB_CONF_Exported_Defines
36 | * @{
37 | */
38 | #define USE_USB_OTG_HS
39 |
40 | #define USBD_CFG_MAX_NUM 1
41 | #define USB_MAX_STR_DESC_SIZ 64
42 | #define USBD_EP0_MAX_PACKET_SIZE 64
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @defgroup USB_CONF_Exported_Types
50 | * @{
51 | */
52 | /**
53 | * @}
54 | */
55 |
56 |
57 | /** @defgroup USB_CONF_Exported_Macros
58 | * @{
59 | */
60 | /**
61 | * @}
62 | */
63 |
64 | /** @defgroup USB_CONF_Exported_Variables
65 | * @{
66 | */
67 | /**
68 | * @}
69 | */
70 |
71 | /** @defgroup USB_CONF_Exported_FunctionsPrototype
72 | * @{
73 | */
74 | /**
75 | * @}
76 | */
77 |
78 |
79 | #endif //__USBD_CONF__H__
80 |
81 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
82 |
83 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief Header file for usbd_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USBD_CORE_H
30 | #define __USBD_CORE_H
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usb_dcd.h"
34 | #include "usbd_def.h"
35 | #include "usbd_conf.h"
36 |
37 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_CORE
42 | * @brief This file is the Header file for usbd_core.c file
43 | * @{
44 | */
45 |
46 |
47 | /** @defgroup USBD_CORE_Exported_Defines
48 | * @{
49 | */
50 |
51 | typedef enum {
52 | USBD_OK = 0,
53 | USBD_BUSY,
54 | USBD_FAIL,
55 | }USBD_Status;
56 | /**
57 | * @}
58 | */
59 |
60 |
61 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
62 | * @{
63 | */
64 |
65 |
66 | /**
67 | * @}
68 | */
69 |
70 |
71 |
72 | /** @defgroup USBD_CORE_Exported_Macros
73 | * @{
74 | */
75 |
76 | /**
77 | * @}
78 | */
79 |
80 | /** @defgroup USBD_CORE_Exported_Variables
81 | * @{
82 | */
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype
89 | * @{
90 | */
91 | void USBD_Init(USB_OTG_CORE_HANDLE *pdev,
92 | USB_OTG_CORE_ID_TypeDef coreID,
93 | USBD_DEVICE *pDevice,
94 | USBD_Class_cb_TypeDef *class_cb,
95 | USBD_Usr_cb_TypeDef *usr_cb);
96 |
97 | USBD_Status USBD_DeInit(USB_OTG_CORE_HANDLE *pdev);
98 |
99 | USBD_Status USBD_ClrCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx);
100 |
101 | USBD_Status USBD_SetCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx);
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | #endif /* __USBD_CORE_H */
108 |
109 | /**
110 | * @}
111 | */
112 |
113 | /**
114 | * @}
115 | */
116 |
117 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_def.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_def.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief general defines for the usb device library
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 |
30 | #ifndef __USBD_DEF_H
31 | #define __USBD_DEF_H
32 |
33 | /* Includes ------------------------------------------------------------------*/
34 | #include "usbd_conf.h"
35 |
36 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_DEF
41 | * @brief general defines for the usb device library file
42 | * @{
43 | */
44 |
45 | /** @defgroup USB_DEF_Exported_Defines
46 | * @{
47 | */
48 |
49 | #ifndef NULL
50 | #define NULL 0
51 | #endif
52 |
53 | #define USB_LEN_DEV_QUALIFIER_DESC 0x0A
54 | #define USB_LEN_DEV_DESC 0x12
55 | #define USB_LEN_CFG_DESC 0x09
56 | #define USB_LEN_IF_DESC 0x09
57 | #define USB_LEN_EP_DESC 0x07
58 | #define USB_LEN_OTG_DESC 0x03
59 |
60 | #define USBD_IDX_LANGID_STR 0x00
61 | #define USBD_IDX_MFC_STR 0x01
62 | #define USBD_IDX_PRODUCT_STR 0x02
63 | #define USBD_IDX_SERIAL_STR 0x03
64 | #define USBD_IDX_CONFIG_STR 0x04
65 | #define USBD_IDX_INTERFACE_STR 0x05
66 |
67 | #define USB_REQ_TYPE_STANDARD 0x00
68 | #define USB_REQ_TYPE_CLASS 0x20
69 | #define USB_REQ_TYPE_VENDOR 0x40
70 | #define USB_REQ_TYPE_MASK 0x60
71 |
72 | #define USB_REQ_RECIPIENT_DEVICE 0x00
73 | #define USB_REQ_RECIPIENT_INTERFACE 0x01
74 | #define USB_REQ_RECIPIENT_ENDPOINT 0x02
75 | #define USB_REQ_RECIPIENT_MASK 0x03
76 |
77 | #define USB_REQ_GET_STATUS 0x00
78 | #define USB_REQ_CLEAR_FEATURE 0x01
79 | #define USB_REQ_SET_FEATURE 0x03
80 | #define USB_REQ_SET_ADDRESS 0x05
81 | #define USB_REQ_GET_DESCRIPTOR 0x06
82 | #define USB_REQ_SET_DESCRIPTOR 0x07
83 | #define USB_REQ_GET_CONFIGURATION 0x08
84 | #define USB_REQ_SET_CONFIGURATION 0x09
85 | #define USB_REQ_GET_INTERFACE 0x0A
86 | #define USB_REQ_SET_INTERFACE 0x0B
87 | #define USB_REQ_SYNCH_FRAME 0x0C
88 |
89 | #define USB_DESC_TYPE_DEVICE 1
90 | #define USB_DESC_TYPE_CONFIGURATION 2
91 | #define USB_DESC_TYPE_STRING 3
92 | #define USB_DESC_TYPE_INTERFACE 4
93 | #define USB_DESC_TYPE_ENDPOINT 5
94 | #define USB_DESC_TYPE_DEVICE_QUALIFIER 6
95 | #define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION 7
96 | #define USB_DESC_TYPE_BOS 0x0F
97 |
98 | #define USB_CONFIG_REMOTE_WAKEUP 2
99 | #define USB_CONFIG_SELF_POWERED 1
100 |
101 | #define USB_FEATURE_EP_HALT 0
102 | #define USB_FEATURE_REMOTE_WAKEUP 1
103 | #define USB_FEATURE_TEST_MODE 2
104 |
105 | /**
106 | * @}
107 | */
108 |
109 |
110 | /** @defgroup USBD_DEF_Exported_TypesDefinitions
111 | * @{
112 | */
113 | /**
114 | * @}
115 | */
116 |
117 |
118 |
119 | /** @defgroup USBD_DEF_Exported_Macros
120 | * @{
121 | */
122 | #define SWAPBYTE(addr) (((uint16_t)(*((uint8_t *)(addr)))) + \
123 | (((uint16_t)(*(((uint8_t *)(addr)) + 1))) << 8))
124 |
125 | #define LOBYTE(x) ((uint8_t)((x) & 0x00FF))
126 | #define HIBYTE(x) ((uint8_t)(((x) & 0xFF00) >>8))
127 | /**
128 | * @}
129 | */
130 |
131 | /** @defgroup USBD_DEF_Exported_Variables
132 | * @{
133 | */
134 |
135 | /**
136 | * @}
137 | */
138 |
139 | /** @defgroup USBD_DEF_Exported_FunctionsPrototype
140 | * @{
141 | */
142 |
143 | /**
144 | * @}
145 | */
146 |
147 | #endif /* __USBD_DEF_H */
148 |
149 | /**
150 | * @}
151 | */
152 |
153 | /**
154 | * @}
155 | */
156 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
157 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief header file for the usbd_ioreq.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 |
30 | #ifndef __USBD_IOREQ_H_
31 | #define __USBD_IOREQ_H_
32 |
33 | /* Includes ------------------------------------------------------------------*/
34 | #include "usbd_def.h"
35 | #include "usbd_core.h"
36 |
37 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_IOREQ
42 | * @brief header file for the usbd_ioreq.c file
43 | * @{
44 | */
45 |
46 | /** @defgroup USBD_IOREQ_Exported_Defines
47 | * @{
48 | */
49 | /**
50 | * @}
51 | */
52 |
53 |
54 | /** @defgroup USBD_IOREQ_Exported_Types
55 | * @{
56 | */
57 |
58 |
59 | /**
60 | * @}
61 | */
62 |
63 |
64 |
65 | /** @defgroup USBD_IOREQ_Exported_Macros
66 | * @{
67 | */
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /** @defgroup USBD_IOREQ_Exported_Variables
74 | * @{
75 | */
76 |
77 | /**
78 | * @}
79 | */
80 |
81 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype
82 | * @{
83 | */
84 |
85 | USBD_Status USBD_CtlSendData (USB_OTG_CORE_HANDLE *pdev,
86 | uint8_t *buf,
87 | uint16_t len);
88 |
89 | USBD_Status USBD_CtlContinueSendData (USB_OTG_CORE_HANDLE *pdev,
90 | uint8_t *pbuf,
91 | uint16_t len);
92 |
93 | USBD_Status USBD_CtlPrepareRx (USB_OTG_CORE_HANDLE *pdev,
94 | uint8_t *pbuf,
95 | uint16_t len);
96 |
97 | USBD_Status USBD_CtlContinueRx (USB_OTG_CORE_HANDLE *pdev,
98 | uint8_t *pbuf,
99 | uint16_t len);
100 |
101 | USBD_Status USBD_CtlSendStatus (USB_OTG_CORE_HANDLE *pdev);
102 |
103 | USBD_Status USBD_CtlReceiveStatus (USB_OTG_CORE_HANDLE *pdev);
104 |
105 | uint16_t USBD_GetRxCount (USB_OTG_CORE_HANDLE *pdev ,
106 | uint8_t epnum);
107 |
108 | /**
109 | * @}
110 | */
111 |
112 | #endif /* __USBD_IOREQ_H_ */
113 |
114 | /**
115 | * @}
116 | */
117 |
118 | /**
119 | * @}
120 | */
121 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
122 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_req.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief header file for the usbd_req.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 |
30 | #ifndef __USB_REQUEST_H_
31 | #define __USB_REQUEST_H_
32 |
33 | /* Includes ------------------------------------------------------------------*/
34 | #include "usbd_def.h"
35 | #include "usbd_core.h"
36 | #include "usbd_conf.h"
37 |
38 |
39 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
40 | * @{
41 | */
42 |
43 | /** @defgroup USBD_REQ
44 | * @brief header file for the usbd_ioreq.c file
45 | * @{
46 | */
47 |
48 | /** @defgroup USBD_REQ_Exported_Defines
49 | * @{
50 | */
51 | /**
52 | * @}
53 | */
54 |
55 |
56 | /** @defgroup USBD_REQ_Exported_Types
57 | * @{
58 | */
59 | /**
60 | * @}
61 | */
62 |
63 |
64 |
65 | /** @defgroup USBD_REQ_Exported_Macros
66 | * @{
67 | */
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBD_REQ_Exported_Variables
73 | * @{
74 | */
75 | /**
76 | * @}
77 | */
78 |
79 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype
80 | * @{
81 | */
82 |
83 | USBD_Status USBD_StdDevReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
84 | USBD_Status USBD_StdItfReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
85 | USBD_Status USBD_StdEPReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
86 | void USBD_ParseSetupRequest( USB_OTG_CORE_HANDLE *pdev,
87 | USB_SETUP_REQ *req);
88 |
89 | void USBD_CtlError( USB_OTG_CORE_HANDLE *pdev,
90 | USB_SETUP_REQ *req);
91 |
92 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
93 | /**
94 | * @}
95 | */
96 |
97 | #endif /* __USB_REQUEST_H_ */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 |
108 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
109 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/inc/usbd_usr.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_usr.h
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief Header file for usbd_usr.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USBD_USR_H__
30 | #define __USBD_USR_H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usbd_ioreq.h"
34 | /** @addtogroup USBD_USER
35 | * @{
36 | */
37 |
38 | /** @addtogroup USBD_MSC_DEMO_USER_CALLBACKS
39 | * @{
40 | */
41 |
42 | /** @defgroup USBD_USR
43 | * @brief This file is the Header file for usbd_usr.c
44 | * @{
45 | */
46 |
47 |
48 | /** @defgroup USBD_USR_Exported_Types
49 | * @{
50 | */
51 |
52 | extern USBD_Usr_cb_TypeDef USR_cb;
53 | extern USBD_Usr_cb_TypeDef USR_FS_cb;
54 | extern USBD_Usr_cb_TypeDef USR_HS_cb;
55 |
56 |
57 |
58 | /**
59 | * @}
60 | */
61 |
62 |
63 |
64 | /** @defgroup USBD_USR_Exported_Defines
65 | * @{
66 | */
67 |
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBD_USR_Exported_Macros
73 | * @{
74 | */
75 | /**
76 | * @}
77 | */
78 |
79 | /** @defgroup USBD_USR_Exported_Variables
80 | * @{
81 | */
82 |
83 | void USBD_USR_Init(void);
84 | void USBD_USR_DeviceReset (uint8_t speed);
85 | void USBD_USR_DeviceConfigured (void);
86 | void USBD_USR_DeviceSuspended(void);
87 | void USBD_USR_DeviceResumed(void);
88 |
89 | void USBD_USR_DeviceConnected(void);
90 | void USBD_USR_DeviceDisconnected(void);
91 |
92 | void USBD_USR_FS_Init(void);
93 | void USBD_USR_FS_DeviceReset (uint8_t speed);
94 | void USBD_USR_FS_DeviceConfigured (void);
95 | void USBD_USR_FS_DeviceSuspended(void);
96 | void USBD_USR_FS_DeviceResumed(void);
97 |
98 | void USBD_USR_FS_DeviceConnected(void);
99 | void USBD_USR_FS_DeviceDisconnected(void);
100 |
101 | void USBD_USR_HS_Init(void);
102 | void USBD_USR_HS_DeviceReset (uint8_t speed);
103 | void USBD_USR_HS_DeviceConfigured (void);
104 | void USBD_USR_HS_DeviceSuspended(void);
105 | void USBD_USR_HS_DeviceResumed(void);
106 |
107 | void USBD_USR_HS_DeviceConnected(void);
108 | void USBD_USR_HS_DeviceDisconnected(void);
109 |
110 | /**
111 | * @}
112 | */
113 |
114 | /** @defgroup USBD_USR_Exported_FunctionsPrototype
115 | * @{
116 | */
117 | /**
118 | * @}
119 | */
120 |
121 | #endif /*__USBD_USR_H__*/
122 |
123 | /**
124 | * @}
125 | */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /**
132 | * @}
133 | */
134 |
135 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
136 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Device/src/usbd_ioreq.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.c
4 | * @author MCD Application Team
5 | * @version V1.2.0
6 | * @date 09-November-2015
7 | * @brief This file provides the IO requests APIs for control endpoints.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "usbd_ioreq.h"
30 |
31 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 |
36 | /** @defgroup USBD_IOREQ
37 | * @brief control I/O requests module
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_IOREQ_Private_TypesDefinitions
42 | * @{
43 | */
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @defgroup USBD_IOREQ_Private_Defines
50 | * @{
51 | */
52 |
53 | /**
54 | * @}
55 | */
56 |
57 |
58 | /** @defgroup USBD_IOREQ_Private_Macros
59 | * @{
60 | */
61 | /**
62 | * @}
63 | */
64 |
65 |
66 | /** @defgroup USBD_IOREQ_Private_Variables
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 |
75 | /** @defgroup USBD_IOREQ_Private_FunctionPrototypes
76 | * @{
77 | */
78 | /**
79 | * @}
80 | */
81 |
82 |
83 | /** @defgroup USBD_IOREQ_Private_Functions
84 | * @{
85 | */
86 |
87 | /**
88 | * @brief USBD_CtlSendData
89 | * send data on the ctl pipe
90 | * @param pdev: device instance
91 | * @param buff: pointer to data buffer
92 | * @param len: length of data to be sent
93 | * @retval status
94 | */
95 | USBD_Status USBD_CtlSendData (USB_OTG_CORE_HANDLE *pdev,
96 | uint8_t *pbuf,
97 | uint16_t len)
98 | {
99 | USBD_Status ret = USBD_OK;
100 |
101 | pdev->dev.in_ep[0].total_data_len = len;
102 | pdev->dev.in_ep[0].rem_data_len = len;
103 | pdev->dev.device_state = USB_OTG_EP0_DATA_IN;
104 |
105 | DCD_EP_Tx (pdev, 0, pbuf, len);
106 |
107 | return ret;
108 | }
109 |
110 | /**
111 | * @brief USBD_CtlContinueSendData
112 | * continue sending data on the ctl pipe
113 | * @param pdev: device instance
114 | * @param buff: pointer to data buffer
115 | * @param len: length of data to be sent
116 | * @retval status
117 | */
118 | USBD_Status USBD_CtlContinueSendData (USB_OTG_CORE_HANDLE *pdev,
119 | uint8_t *pbuf,
120 | uint16_t len)
121 | {
122 | USBD_Status ret = USBD_OK;
123 |
124 | DCD_EP_Tx (pdev, 0, pbuf, len);
125 |
126 |
127 | return ret;
128 | }
129 |
130 | /**
131 | * @brief USBD_CtlPrepareRx
132 | * receive data on the ctl pipe
133 | * @param pdev: USB OTG device instance
134 | * @param buff: pointer to data buffer
135 | * @param len: length of data to be received
136 | * @retval status
137 | */
138 | USBD_Status USBD_CtlPrepareRx (USB_OTG_CORE_HANDLE *pdev,
139 | uint8_t *pbuf,
140 | uint16_t len)
141 | {
142 | USBD_Status ret = USBD_OK;
143 |
144 | pdev->dev.out_ep[0].total_data_len = len;
145 | pdev->dev.out_ep[0].rem_data_len = len;
146 | pdev->dev.device_state = USB_OTG_EP0_DATA_OUT;
147 |
148 | DCD_EP_PrepareRx (pdev,
149 | 0,
150 | pbuf,
151 | len);
152 |
153 |
154 | return ret;
155 | }
156 |
157 | /**
158 | * @brief USBD_CtlContinueRx
159 | * continue receive data on the ctl pipe
160 | * @param pdev: USB OTG device instance
161 | * @param buff: pointer to data buffer
162 | * @param len: length of data to be received
163 | * @retval status
164 | */
165 | USBD_Status USBD_CtlContinueRx (USB_OTG_CORE_HANDLE *pdev,
166 | uint8_t *pbuf,
167 | uint16_t len)
168 | {
169 | USBD_Status ret = USBD_OK;
170 |
171 | DCD_EP_PrepareRx (pdev,
172 | 0,
173 | pbuf,
174 | len);
175 | return ret;
176 | }
177 | /**
178 | * @brief USBD_CtlSendStatus
179 | * send zero length packet on the ctl pipe
180 | * @param pdev: USB OTG device instance
181 | * @retval status
182 | */
183 | USBD_Status USBD_CtlSendStatus (USB_OTG_CORE_HANDLE *pdev)
184 | {
185 | USBD_Status ret = USBD_OK;
186 | pdev->dev.device_state = USB_OTG_EP0_STATUS_IN;
187 | DCD_EP_Tx (pdev,
188 | 0,
189 | NULL,
190 | 0);
191 |
192 | USB_OTG_EP0_OutStart(pdev);
193 |
194 | return ret;
195 | }
196 |
197 | /**
198 | * @brief USBD_CtlReceiveStatus
199 | * receive zero length packet on the ctl pipe
200 | * @param pdev: USB OTG device instance
201 | * @retval status
202 | */
203 | USBD_Status USBD_CtlReceiveStatus (USB_OTG_CORE_HANDLE *pdev)
204 | {
205 | USBD_Status ret = USBD_OK;
206 | pdev->dev.device_state = USB_OTG_EP0_STATUS_OUT;
207 | DCD_EP_PrepareRx ( pdev,
208 | 0,
209 | NULL,
210 | 0);
211 |
212 | USB_OTG_EP0_OutStart(pdev);
213 |
214 | return ret;
215 | }
216 |
217 |
218 | /**
219 | * @brief USBD_GetRxCount
220 | * returns the received data length
221 | * @param pdev: USB OTG device instance
222 | * epnum: endpoint index
223 | * @retval Rx Data blength
224 | */
225 | uint16_t USBD_GetRxCount (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum)
226 | {
227 | return pdev->dev.out_ep[epnum].xfer_count;
228 | }
229 |
230 | /**
231 | * @}
232 | */
233 |
234 |
235 | /**
236 | * @}
237 | */
238 |
239 |
240 | /**
241 | * @}
242 | */
243 |
244 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
245 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Driver/inc/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.2.0
6 | * @date 09-November-2015
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USB_BSP__H__
30 | #define __USB_BSP__H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "stm32f4xx.h"
34 | #include "usb_core.h"
35 | //#include "stm32ext.h"
36 |
37 | /** @addtogroup USB_OTG_DRIVER
38 | * @{
39 | */
40 |
41 | /** @defgroup USB_BSP
42 | * @brief This file is the
43 | * @{
44 | */
45 |
46 |
47 | /** @defgroup USB_BSP_Exported_Defines
48 | * @{
49 | */
50 | /**
51 | * @}
52 | */
53 |
54 |
55 | /** @defgroup USB_BSP_Exported_Types
56 | * @{
57 | */
58 | /**
59 | * @}
60 | */
61 |
62 |
63 | /** @defgroup USB_BSP_Exported_Macros
64 | * @{
65 | */
66 | /**
67 | * @}
68 | */
69 |
70 | /** @defgroup USB_BSP_Exported_Variables
71 | * @{
72 | */
73 | /**
74 | * @}
75 | */
76 |
77 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
78 | * @{
79 | */
80 | void BSP_Init(void);
81 |
82 | void USB_OTG_BSP_Init (USB_OTG_CORE_HANDLE *pdev);
83 | void USB_OTG_BSP_uDelay (const uint32_t usec);
84 | void USB_OTG_BSP_mDelay (const uint32_t msec);
85 | void USB_OTG_BSP_EnableInterrupt (USB_OTG_CORE_HANDLE *pdev);
86 | void USB_OTG_BSP_TimerIRQ (void);
87 | #ifdef USE_HOST_MODE
88 | void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev);
89 | void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev,uint8_t state);
90 | void USB_OTG_BSP_Resume(USB_OTG_CORE_HANDLE *pdev) ;
91 | void USB_OTG_BSP_Suspend(USB_OTG_CORE_HANDLE *pdev);
92 |
93 | #endif /* USE_HOST_MODE */
94 | /**
95 | * @}
96 | */
97 |
98 | #endif /* __USB_BSP__H__ */
99 |
100 | /**
101 | * @}
102 | */
103 |
104 | /**
105 | * @}
106 | */
107 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
108 |
109 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Driver/inc/usb_dcd.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_dcd.h
4 | * @author MCD Application Team
5 | * @version V2.2.0
6 | * @date 09-November-2015
7 | * @brief Peripheral Driver Header file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __DCD_H__
30 | #define __DCD_H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usb_core.h"
34 |
35 |
36 | /** @addtogroup USB_OTG_DRIVER
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_DCD
41 | * @brief This file is the
42 | * @{
43 | */
44 |
45 |
46 | /** @defgroup USB_DCD_Exported_Defines
47 | * @{
48 | */
49 | #define USB_OTG_EP_CONTROL 0
50 | #define USB_OTG_EP_ISOC 1
51 | #define USB_OTG_EP_BULK 2
52 | #define USB_OTG_EP_INT 3
53 | #define USB_OTG_EP_MASK 3
54 |
55 | /* Device Status */
56 | #define USB_OTG_DEFAULT 1
57 | #define USB_OTG_ADDRESSED 2
58 | #define USB_OTG_CONFIGURED 3
59 | #define USB_OTG_SUSPENDED 4
60 |
61 | /**
62 | * @}
63 | */
64 |
65 |
66 | /** @defgroup USB_DCD_Exported_Types
67 | * @{
68 | */
69 | /********************************************************************************
70 | Data structure type
71 | ********************************************************************************/
72 | typedef struct
73 | {
74 | uint8_t bLength;
75 | uint8_t bDescriptorType;
76 | uint8_t bEndpointAddress;
77 | uint8_t bmAttributes;
78 | uint16_t wMaxPacketSize;
79 | uint8_t bInterval;
80 | }
81 | EP_DESCRIPTOR , *PEP_DESCRIPTOR;
82 |
83 | /**
84 | * @}
85 | */
86 |
87 |
88 | /** @defgroup USB_DCD_Exported_Macros
89 | * @{
90 | */
91 | /**
92 | * @}
93 | */
94 |
95 | /** @defgroup USB_DCD_Exported_Variables
96 | * @{
97 | */
98 | /**
99 | * @}
100 | */
101 |
102 | /** @defgroup USB_DCD_Exported_FunctionsPrototype
103 | * @{
104 | */
105 | /********************************************************************************
106 | EXPORTED FUNCTION FROM THE USB-OTG LAYER
107 | ********************************************************************************/
108 | void DCD_Init(USB_OTG_CORE_HANDLE *pdev ,
109 | USB_OTG_CORE_ID_TypeDef coreID);
110 |
111 | void DCD_DevConnect (USB_OTG_CORE_HANDLE *pdev);
112 | void DCD_DevDisconnect (USB_OTG_CORE_HANDLE *pdev);
113 | void DCD_EP_SetAddress (USB_OTG_CORE_HANDLE *pdev,
114 | uint8_t address);
115 | uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev ,
116 | uint8_t ep_addr,
117 | uint16_t ep_mps,
118 | uint8_t ep_type);
119 |
120 | uint32_t DCD_EP_Close (USB_OTG_CORE_HANDLE *pdev,
121 | uint8_t ep_addr);
122 |
123 |
124 | uint32_t DCD_EP_PrepareRx ( USB_OTG_CORE_HANDLE *pdev,
125 | uint8_t ep_addr,
126 | uint8_t *pbuf,
127 | uint16_t buf_len);
128 |
129 | uint32_t DCD_EP_Tx (USB_OTG_CORE_HANDLE *pdev,
130 | uint8_t ep_addr,
131 | uint8_t *pbuf,
132 | uint32_t buf_len);
133 | uint32_t DCD_EP_Stall (USB_OTG_CORE_HANDLE *pdev,
134 | uint8_t epnum);
135 | uint32_t DCD_EP_ClrStall (USB_OTG_CORE_HANDLE *pdev,
136 | uint8_t epnum);
137 | uint32_t DCD_EP_Flush (USB_OTG_CORE_HANDLE *pdev,
138 | uint8_t epnum);
139 | uint32_t DCD_Handle_ISR(USB_OTG_CORE_HANDLE *pdev);
140 |
141 | uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev ,
142 | uint8_t epnum);
143 |
144 | void DCD_SetEPStatus (USB_OTG_CORE_HANDLE *pdev ,
145 | uint8_t epnum ,
146 | uint32_t Status);
147 |
148 | /**
149 | * @}
150 | */
151 |
152 |
153 | #endif /* __DCD_H__ */
154 |
155 |
156 | /**
157 | * @}
158 | */
159 |
160 | /**
161 | * @}
162 | */
163 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
164 |
165 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Driver/inc/usb_dcd_int.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_dcd_int.h
4 | * @author MCD Application Team
5 | * @version V2.2.0
6 | * @date 09-November-2015
7 | * @brief Peripheral Device Interface Layer
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef USB_DCD_INT_H__
30 | #define USB_DCD_INT_H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usb_dcd.h"
34 |
35 |
36 |
37 | /** @addtogroup USB_OTG_DRIVER
38 | * @{
39 | */
40 |
41 | /** @defgroup USB_DCD_INT
42 | * @brief This file is the
43 | * @{
44 | */
45 |
46 |
47 | /** @defgroup USB_DCD_INT_Exported_Defines
48 | * @{
49 | */
50 |
51 | typedef struct _USBD_DCD_INT
52 | {
53 | uint8_t (* DataOutStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
54 | uint8_t (* DataInStage) (USB_OTG_CORE_HANDLE *pdev , uint8_t epnum);
55 | uint8_t (* SetupStage) (USB_OTG_CORE_HANDLE *pdev);
56 | uint8_t (* SOF) (USB_OTG_CORE_HANDLE *pdev);
57 | uint8_t (* Reset) (USB_OTG_CORE_HANDLE *pdev);
58 | uint8_t (* Suspend) (USB_OTG_CORE_HANDLE *pdev);
59 | uint8_t (* Resume) (USB_OTG_CORE_HANDLE *pdev);
60 | uint8_t (* IsoINIncomplete) (USB_OTG_CORE_HANDLE *pdev);
61 | uint8_t (* IsoOUTIncomplete) (USB_OTG_CORE_HANDLE *pdev);
62 |
63 | uint8_t (* DevConnected) (USB_OTG_CORE_HANDLE *pdev);
64 | uint8_t (* DevDisconnected) (USB_OTG_CORE_HANDLE *pdev);
65 |
66 | }USBD_DCD_INT_cb_TypeDef;
67 |
68 | extern USBD_DCD_INT_cb_TypeDef *USBD_DCD_INT_fops;
69 | /**
70 | * @}
71 | */
72 |
73 |
74 | /** @defgroup USB_DCD_INT_Exported_Types
75 | * @{
76 | */
77 | /**
78 | * @}
79 | */
80 |
81 | /** @defgroup USB_DCD_INT_Exported_Macros
82 | * @{
83 | */
84 |
85 | #define CLEAR_IN_EP_INTR(epnum,intr) \
86 | diepint.d32=0; \
87 | diepint.b.intr = 1; \
88 | USB_OTG_WRITE_REG32(&pdev->regs.INEP_REGS[epnum]->DIEPINT,diepint.d32);
89 |
90 | #define CLEAR_OUT_EP_INTR(epnum,intr) \
91 | doepint.d32=0; \
92 | doepint.b.intr = 1; \
93 | USB_OTG_WRITE_REG32(&pdev->regs.OUTEP_REGS[(epnum)]->DOEPINT,doepint.d32);
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /** @defgroup USB_DCD_INT_Exported_Variables
100 | * @{
101 | */
102 | /**
103 | * @}
104 | */
105 |
106 | /** @defgroup USB_DCD_INT_Exported_FunctionsPrototype
107 | * @{
108 | */
109 |
110 | uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
111 | uint32_t USBD_OTG_EP1OUT_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
112 | uint32_t USBD_OTG_EP1IN_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
113 | /**
114 | * @}
115 | */
116 |
117 |
118 | #endif /* USB_DCD_INT_H__ */
119 |
120 | /**
121 | * @}
122 | */
123 |
124 | /**
125 | * @}
126 | */
127 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
128 |
129 |
--------------------------------------------------------------------------------
/VMS/ST/USB/Driver/inc/usb_otg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_otg.h
4 | * @author MCD Application Team
5 | * @version V2.2.0
6 | * @date 09-November-2015
7 | * @brief OTG Core Header
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USB_OTG__
30 | #define __USB_OTG__
31 |
32 |
33 | /** @addtogroup USB_OTG_DRIVER
34 | * @{
35 | */
36 |
37 | /** @defgroup USB_OTG
38 | * @brief This file is the
39 | * @{
40 | */
41 |
42 |
43 | /** @defgroup USB_OTG_Exported_Defines
44 | * @{
45 | */
46 |
47 |
48 | void USB_OTG_InitiateSRP(void);
49 | void USB_OTG_InitiateHNP(uint8_t state , uint8_t mode);
50 | void USB_OTG_Switchback (USB_OTG_CORE_DEVICE *pdev);
51 | uint32_t USB_OTG_GetCurrentState (USB_OTG_CORE_DEVICE *pdev);
52 |
53 | /**
54 | * @}
55 | */
56 |
57 |
58 | /** @defgroup USB_OTG_Exported_Types
59 | * @{
60 | */
61 | /**
62 | * @}
63 | */
64 |
65 |
66 | /** @defgroup USB_OTG_Exported_Macros
67 | * @{
68 | */
69 | /**
70 | * @}
71 | */
72 |
73 | /** @defgroup USB_OTG_Exported_Variables
74 | * @{
75 | */
76 | /**
77 | * @}
78 | */
79 |
80 | /** @defgroup USB_OTG_Exported_FunctionsPrototype
81 | * @{
82 | */
83 | /**
84 | * @}
85 | */
86 |
87 |
88 | #endif //__USB_OTG__
89 |
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
99 |
100 |
--------------------------------------------------------------------------------
/VMS/System/Include/arm_common_tables.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010-2013 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 17. January 2013
5 | * $Revision: V1.4.1
6 | *
7 | * Project: CMSIS DSP Library
8 | * Title: arm_common_tables.h
9 | *
10 | * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions
11 | *
12 | * Target Processor: Cortex-M4/Cortex-M3
13 | *
14 | * Redistribution and use in source and binary forms, with or without
15 | * modification, are permitted provided that the following conditions
16 | * are met:
17 | * - Redistributions of source code must retain the above copyright
18 | * notice, this list of conditions and the following disclaimer.
19 | * - Redistributions in binary form must reproduce the above copyright
20 | * notice, this list of conditions and the following disclaimer in
21 | * the documentation and/or other materials provided with the
22 | * distribution.
23 | * - Neither the name of ARM LIMITED nor the names of its contributors
24 | * may be used to endorse or promote products derived from this
25 | * software without specific prior written permission.
26 | *
27 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 | * POSSIBILITY OF SUCH DAMAGE.
39 | * -------------------------------------------------------------------- */
40 |
41 | #ifndef _ARM_COMMON_TABLES_H
42 | #define _ARM_COMMON_TABLES_H
43 |
44 | #include "arm_math.h"
45 |
46 | extern const uint16_t armBitRevTable[1024];
47 | extern const q15_t armRecipTableQ15[64];
48 | extern const q31_t armRecipTableQ31[64];
49 | extern const q31_t realCoefAQ31[1024];
50 | extern const q31_t realCoefBQ31[1024];
51 | extern const float32_t twiddleCoef_16[32];
52 | extern const float32_t twiddleCoef_32[64];
53 | extern const float32_t twiddleCoef_64[128];
54 | extern const float32_t twiddleCoef_128[256];
55 | extern const float32_t twiddleCoef_256[512];
56 | extern const float32_t twiddleCoef_512[1024];
57 | extern const float32_t twiddleCoef_1024[2048];
58 | extern const float32_t twiddleCoef_2048[4096];
59 | extern const float32_t twiddleCoef_4096[8192];
60 | #define twiddleCoef twiddleCoef_4096
61 | extern const q31_t twiddleCoefQ31[6144];
62 | extern const q15_t twiddleCoefQ15[6144];
63 | extern const float32_t twiddleCoef_rfft_32[32];
64 | extern const float32_t twiddleCoef_rfft_64[64];
65 | extern const float32_t twiddleCoef_rfft_128[128];
66 | extern const float32_t twiddleCoef_rfft_256[256];
67 | extern const float32_t twiddleCoef_rfft_512[512];
68 | extern const float32_t twiddleCoef_rfft_1024[1024];
69 | extern const float32_t twiddleCoef_rfft_2048[2048];
70 | extern const float32_t twiddleCoef_rfft_4096[4096];
71 |
72 |
73 | #define ARMBITREVINDEXTABLE__16_TABLE_LENGTH ((uint16_t)20 )
74 | #define ARMBITREVINDEXTABLE__32_TABLE_LENGTH ((uint16_t)48 )
75 | #define ARMBITREVINDEXTABLE__64_TABLE_LENGTH ((uint16_t)56 )
76 | #define ARMBITREVINDEXTABLE_128_TABLE_LENGTH ((uint16_t)208 )
77 | #define ARMBITREVINDEXTABLE_256_TABLE_LENGTH ((uint16_t)440 )
78 | #define ARMBITREVINDEXTABLE_512_TABLE_LENGTH ((uint16_t)448 )
79 | #define ARMBITREVINDEXTABLE1024_TABLE_LENGTH ((uint16_t)1800)
80 | #define ARMBITREVINDEXTABLE2048_TABLE_LENGTH ((uint16_t)3808)
81 | #define ARMBITREVINDEXTABLE4096_TABLE_LENGTH ((uint16_t)4032)
82 |
83 | extern const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE__16_TABLE_LENGTH];
84 | extern const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE__32_TABLE_LENGTH];
85 | extern const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE__64_TABLE_LENGTH];
86 | extern const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH];
87 | extern const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH];
88 | extern const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH];
89 | extern const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE1024_TABLE_LENGTH];
90 | extern const uint16_t armBitRevIndexTable2048[ARMBITREVINDEXTABLE2048_TABLE_LENGTH];
91 | extern const uint16_t armBitRevIndexTable4096[ARMBITREVINDEXTABLE4096_TABLE_LENGTH];
92 |
93 | #endif /* ARM_COMMON_TABLES_H */
94 |
--------------------------------------------------------------------------------
/VMS/System/Include/arm_const_structs.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010-2013 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 17. January 2013
5 | * $Revision: V1.4.1
6 | *
7 | * Project: CMSIS DSP Library
8 | * Title: arm_const_structs.h
9 | *
10 | * Description: This file has constant structs that are initialized for
11 | * user convenience. For example, some can be given as
12 | * arguments to the arm_cfft_f32() function.
13 | *
14 | * Target Processor: Cortex-M4/Cortex-M3
15 | *
16 | * Redistribution and use in source and binary forms, with or without
17 | * modification, are permitted provided that the following conditions
18 | * are met:
19 | * - Redistributions of source code must retain the above copyright
20 | * notice, this list of conditions and the following disclaimer.
21 | * - Redistributions in binary form must reproduce the above copyright
22 | * notice, this list of conditions and the following disclaimer in
23 | * the documentation and/or other materials provided with the
24 | * distribution.
25 | * - Neither the name of ARM LIMITED nor the names of its contributors
26 | * may be used to endorse or promote products derived from this
27 | * software without specific prior written permission.
28 | *
29 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
32 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
34 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
39 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 | * POSSIBILITY OF SUCH DAMAGE.
41 | * -------------------------------------------------------------------- */
42 |
43 | #ifndef _ARM_CONST_STRUCTS_H
44 | #define _ARM_CONST_STRUCTS_H
45 |
46 | #include "arm_math.h"
47 | #include "arm_common_tables.h"
48 |
49 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len16 = {
50 | 16, twiddleCoef_16, armBitRevIndexTable16, ARMBITREVINDEXTABLE__16_TABLE_LENGTH
51 | };
52 |
53 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len32 = {
54 | 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE__32_TABLE_LENGTH
55 | };
56 |
57 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len64 = {
58 | 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE__64_TABLE_LENGTH
59 | };
60 |
61 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len128 = {
62 | 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH
63 | };
64 |
65 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len256 = {
66 | 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH
67 | };
68 |
69 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len512 = {
70 | 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH
71 | };
72 |
73 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024 = {
74 | 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE1024_TABLE_LENGTH
75 | };
76 |
77 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048 = {
78 | 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE2048_TABLE_LENGTH
79 | };
80 |
81 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096 = {
82 | 4096, twiddleCoef_4096, armBitRevIndexTable4096, ARMBITREVINDEXTABLE4096_TABLE_LENGTH
83 | };
84 |
85 | #endif
86 |
--------------------------------------------------------------------------------
/VMS/System/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/System/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/VMS/System/Include/stm32f4xx_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_conf.h
4 | * @author MCD Application Team
5 | * @version V1.3.0
6 | * @date 08-November-2013
7 | * @brief Library configuration file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2013 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __STM32F4xx_CONF_H
30 | #define __STM32F4xx_CONF_H
31 |
32 | #if defined (HSE_VALUE)
33 | /* Redefine the HSE value; it's equal to 8 MHz on the STM32F429I-DISCO Kit */
34 | #undef HSE_VALUE
35 | #define HSE_VALUE ((uint32_t)8000000)
36 | #endif /* HSE_VALUE */
37 |
38 | /* Includes ------------------------------------------------------------------*/
39 | /* Uncomment the line below to enable peripheral header file inclusion */
40 | #include "stm32f4xx_adc.h"
41 | #include "stm32f4xx_can.h"
42 | #include "stm32f4xx_crc.h"
43 | #include "stm32f4xx_cryp.h"
44 | #include "stm32f4xx_dac.h"
45 | #include "stm32f4xx_dbgmcu.h"
46 | #include "stm32f4xx_dcmi.h"
47 | #include "stm32f4xx_dma.h"
48 | #include "stm32f4xx_exti.h"
49 | #include "stm32f4xx_flash.h"
50 | #include "stm32f4xx_ltdc.h"
51 | #include "stm32f4xx_dma2d.h"
52 | #include "stm32f4xx_fmc.h"
53 | #include "stm32f4xx_hash.h"
54 | #include "stm32f4xx_gpio.h"
55 | #include "stm32f4xx_i2c.h"
56 | #include "stm32f4xx_iwdg.h"
57 | #include "stm32f4xx_pwr.h"
58 | #include "stm32f4xx_rcc.h"
59 | #include "stm32f4xx_rng.h"
60 | #include "stm32f4xx_rtc.h"
61 | #include "stm32f4xx_sdio.h"
62 | #include "stm32f4xx_spi.h"
63 | #include "stm32f4xx_syscfg.h"
64 | #include "stm32f4xx_tim.h"
65 | #include "stm32f4xx_usart.h"
66 | #include "stm32f4xx_wwdg.h"
67 | #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
68 |
69 | /* Exported types ------------------------------------------------------------*/
70 | /* Exported constants --------------------------------------------------------*/
71 |
72 | /* If an external clock source is used, then the value of the following define
73 | should be set to the value of the external clock source, else, if no external
74 | clock is used, keep this define commented */
75 | /*#define I2S_EXTERNAL_CLOCK_VAL 12288000 */ /* Value of the external clock in Hz */
76 |
77 |
78 | /* Uncomment the line below to expanse the "assert_param" macro in the
79 | Standard Peripheral Library drivers code */
80 | /* #define USE_FULL_ASSERT 1 */
81 |
82 | /* Exported macro ------------------------------------------------------------*/
83 | #ifdef USE_FULL_ASSERT
84 |
85 | /**
86 | * @brief The assert_param macro is used for function's parameters check.
87 | * @param expr: If expr is false, it calls assert_failed function
88 | * which reports the name of the source file and the source
89 | * line number of the call that failed.
90 | * If expr is true, it returns no value.
91 | * @retval None
92 | */
93 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
94 | /* Exported functions ------------------------------------------------------- */
95 | void assert_failed(uint8_t* file, uint32_t line);
96 | #else
97 | #define assert_param(expr) ((void)0)
98 | #endif /* USE_FULL_ASSERT */
99 |
100 | #endif /* __STM32F4xx_CONF_H */
101 |
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
--------------------------------------------------------------------------------
/VMS/System/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.5.0
6 | * @date 06-March-2015
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2015 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /** @addtogroup CMSIS
29 | * @{
30 | */
31 |
32 | /** @addtogroup stm32f4xx_system
33 | * @{
34 | */
35 |
36 | /**
37 | * @brief Define to prevent recursive inclusion
38 | */
39 | #ifndef __SYSTEM_STM32F4XX_H
40 | #define __SYSTEM_STM32F4XX_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | /** @addtogroup STM32F4xx_System_Includes
47 | * @{
48 | */
49 |
50 | /**
51 | * @}
52 | */
53 |
54 |
55 | /** @addtogroup STM32F4xx_System_Exported_types
56 | * @{
57 | */
58 |
59 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
60 |
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @addtogroup STM32F4xx_System_Exported_Constants
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @addtogroup STM32F4xx_System_Exported_Macros
75 | * @{
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /** @addtogroup STM32F4xx_System_Exported_Functions
83 | * @{
84 | */
85 |
86 | extern void SystemInit(void);
87 | extern void SystemCoreClockUpdate(void);
88 | /**
89 | * @}
90 | */
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /*__SYSTEM_STM32F4XX_H */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /**
103 | * @}
104 | */
105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
106 |
--------------------------------------------------------------------------------
/VMS/System/Source/system_stm32f4xx.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/System/Source/system_stm32f4xx.c
--------------------------------------------------------------------------------
/VMS/System/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/System/main.c
--------------------------------------------------------------------------------
/VMS/System/stm32f411xE.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x300;
13 | define symbol __ICFEDIT_size_heap__ = 0x10000;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 | define memory mem with size = 4G;
17 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
18 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
19 |
20 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
21 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
22 |
23 | initialize by copy { readwrite };
24 | do not initialize { section .noinit };
25 |
26 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
27 |
28 | place in ROM_region { readonly };
29 | place in RAM_region { readwrite,
30 | block CSTACK, block HEAP };
31 |
--------------------------------------------------------------------------------
/VMS/Utility/CrabUtility.c:
--------------------------------------------------------------------------------
1 | /******************** Copyright wisearm.com *********************************
2 | * File Name : CrabUtility.c
3 | * Author : 吴创明(aleyn.wu)
4 | * Version : V1.0.0
5 | * Create Date : 2012-06-15
6 | * Last Update : 2016-12-31
7 | * Description : 其它工具
8 | ********************************************************************************/
9 | #include "CrabVMS.h"
10 | #include "CrabUtility.h"
11 | /*******************************************************************************
12 | * Function : fputc
13 | * Caption : 支援Printf的函数
14 | * @Param : 1.ch -
15 | * @Param : 2.f -
16 | * Return : int
17 | * Description : .
18 | *******************************************************************************/
19 | int fputc(int ch, FILE *f)
20 | {
21 | /* Place your implementation of fputc here */
22 | /* e.g. write a character to the USART */
23 | USART_SendData(PRINTF_COM, (uint8_t) ch);
24 |
25 | /* Loop until the end of transmission */
26 | while (USART_GetFlagStatus(PRINTF_COM, USART_FLAG_TC) == RESET);
27 |
28 | return ch;
29 | }
30 | /** @} */
31 |
--------------------------------------------------------------------------------
/VMS/Utility/CrabUtility.h:
--------------------------------------------------------------------------------
1 | /******************** Copyright wisearm.com *********************************
2 | * File Name : CrabUtility.h
3 | * Author : 吴创明(aleyn.wu)
4 | * Version : V1.0.0
5 | * Create Date : 2012-06-15
6 | * Last Update : 2016-12-31
7 | * Description : 其它工具
8 | ********************************************************************************/
9 |
10 | #ifndef __CRAB_UTILITY_H
11 | #define __CRAB_UTILITY_H
12 |
13 | #ifdef __cplusplus
14 | extern "C" {
15 | #endif
16 |
17 | #include "Hardware.h"
18 |
19 | #endif
20 | /** @} */
21 |
--------------------------------------------------------------------------------
/VMS/VMS/CrabApplication.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabApplication.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabApplication.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabApplication.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabCommand.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabCommand.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabCommand.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabCommand.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabLog.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabLog.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabLog.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabLog.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabStorage.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabStorage.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabStorage.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabStorage.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabSystem.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabSystem.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabSystem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabSystem.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabTask.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabTask.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabTask.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabTask.h
--------------------------------------------------------------------------------
/VMS/VMS/CrabTaskHook.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aleyn/Crab/0fa51696163b89e52c9eca9ff89c39553c7b50f2/VMS/VMS/CrabTaskHook.c
--------------------------------------------------------------------------------
/VMS/VMS/CrabVersionFW.h:
--------------------------------------------------------------------------------
1 | /**************************************/
2 | /* Generate by genvs.exe */
3 | /* Update: 2016-12-14 18:49 */
4 | /**************************************/
5 | #ifndef __CRAB_FWVERSION_H__
6 | #define __CRAB_FWVERSION_H__
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | #define CRAB_FW_COMPILE_DATE "2017-06-10 18:49"
13 | #define CRAB_FW_VERSION "2.0.1007"
14 | #define CRAB_FW_SERIAL "MYNJXUOYMoNPfMfY"
15 | #define CRAB_FW_VERSION_MAJOR 2
16 | #define CRAB_FW_VERSION_MINOR 2
17 | #define CRAB_FW_VERSION_BUILD 1007
18 |
19 | #ifdef __cplusplus
20 | }
21 | #endif
22 | #endif
23 |
--------------------------------------------------------------------------------
/VMS/VMS/CrabVersionFW.ini:
--------------------------------------------------------------------------------
1 | Config:[%RootKey%]
2 | [%
3 | Token:"Major"
4 | Type:Integer
5 | Action:Default
6 | Value:1
7 | %]
8 | [%
9 | Token:"Minor"
10 | Type:Integer
11 | Action:Default
12 | Value:0
13 | %]
14 | [%
15 | Token:"Build"
16 | Type:Integer
17 | Action:Inc
18 | Value:419
19 | %]
20 | [%
21 | Token:"Serial"
22 | Type:Serial
23 | Action:Random
24 | Value:"MYNJXUOYMoNPfMfY"
25 | Format:"Unikey16"
26 | %]
27 | [%
28 | Token:"LastUpdate"
29 | Type:Datetime
30 | Action:System
31 | Value:"2016-12-14 18:49:06"
32 | Format:"yyyy-mm-dd hh:mm"
33 | %]
34 |
35 | [%Template%]
36 |
37 | /**************************************/
38 | /* [#INFO#] [#FILL,38#]*/
39 | /* Update: [#LASTUPDATE#] [#FILL,38#]*/
40 | /**************************************/
41 | #ifndef __CRAB_FWVERSION_H__
42 | #define __CRAB_FWVERSION_H__
43 |
44 | #ifdef __cplusplus
45 | extern "C" {
46 | #endif
47 |
48 | #define CRAB_FW_COMPILE_DATE "[#LASTUPDATE#]"
49 | #define CRAB_FW_VERSION "[#MAJOR#].[#MINOR#].[#BUILD#]"
50 | #define CRAB_FW_SERIAL "[#SERIAL#]"
51 | #define CRAB_FW_VERSION_MAJOR [#MAJOR#]
52 | #define CRAB_FW_VERSION_MINOR [#MINOR#]
53 | #define CRAB_FW_VERSION_BUILD [#BUILD#]
54 |
55 | #ifdef __cplusplus
56 | }
57 | #endif
58 | #endif
59 | [%TempEnd%]
60 |
61 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-tactile
--------------------------------------------------------------------------------