├── .gitattributes
├── .gitignore
├── README.md
├── iar_adc_test
├── Libraries
│ ├── CMSIS
│ │ ├── Include
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_math.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ └── core_cmInstr.h
│ │ └── ST
│ │ │ └── STM32F4xx
│ │ │ ├── Include
│ │ │ ├── stm32f4xx.h
│ │ │ └── system_stm32f4xx.h
│ │ │ ├── Release_Notes.html
│ │ │ └── Source
│ │ │ └── Templates
│ │ │ ├── TASKING
│ │ │ └── cstart_thumb2.asm
│ │ │ ├── TrueSTUDIO
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── arm
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── gcc_ride7
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── iar
│ │ │ └── startup_stm32f4xx.s
│ │ │ └── system_stm32f4xx.c
│ ├── STM32F4xx_StdPeriph_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ │ ├── misc.h
│ │ │ ├── stm32f4xx_adc.h
│ │ │ ├── stm32f4xx_can.h
│ │ │ ├── stm32f4xx_crc.h
│ │ │ ├── stm32f4xx_cryp.h
│ │ │ ├── stm32f4xx_dac.h
│ │ │ ├── stm32f4xx_dbgmcu.h
│ │ │ ├── stm32f4xx_dcmi.h
│ │ │ ├── stm32f4xx_dma.h
│ │ │ ├── stm32f4xx_exti.h
│ │ │ ├── stm32f4xx_flash.h
│ │ │ ├── stm32f4xx_fsmc.h
│ │ │ ├── stm32f4xx_gpio.h
│ │ │ ├── stm32f4xx_hash.h
│ │ │ ├── stm32f4xx_i2c.h
│ │ │ ├── stm32f4xx_iwdg.h
│ │ │ ├── stm32f4xx_pwr.h
│ │ │ ├── stm32f4xx_rcc.h
│ │ │ ├── stm32f4xx_rng.h
│ │ │ ├── stm32f4xx_rtc.h
│ │ │ ├── stm32f4xx_sdio.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_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_exti.c
│ │ │ ├── stm32f4xx_flash.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_pwr.c
│ │ │ ├── stm32f4xx_rcc.c
│ │ │ ├── stm32f4xx_rng.c
│ │ │ ├── stm32f4xx_rtc.c
│ │ │ ├── stm32f4xx_sdio.c
│ │ │ ├── stm32f4xx_spi.c
│ │ │ ├── stm32f4xx_syscfg.c
│ │ │ ├── stm32f4xx_tim.c
│ │ │ ├── stm32f4xx_usart.c
│ │ │ └── stm32f4xx_wwdg.c
│ ├── STM32_USB_Device_Library
│ │ ├── Class
│ │ │ ├── audio
│ │ │ │ ├── inc
│ │ │ │ │ ├── usbd_audio_core.h
│ │ │ │ │ └── usbd_audio_out_if.h
│ │ │ │ └── src
│ │ │ │ │ ├── usbd_audio_core.c
│ │ │ │ │ └── usbd_audio_out_if.c
│ │ │ ├── cdc
│ │ │ │ ├── inc
│ │ │ │ │ ├── usbd_cdc_core.h
│ │ │ │ │ └── usbd_cdc_if_template.h
│ │ │ │ └── src
│ │ │ │ │ ├── usbd_cdc_core.c
│ │ │ │ │ └── usbd_cdc_if_template.c
│ │ │ ├── dfu
│ │ │ │ ├── inc
│ │ │ │ │ ├── usbd_dfu_core.h
│ │ │ │ │ ├── usbd_dfu_mal.h
│ │ │ │ │ ├── usbd_flash_if.h
│ │ │ │ │ ├── usbd_mem_if_template.h
│ │ │ │ │ └── usbd_otp_if.h
│ │ │ │ └── src
│ │ │ │ │ ├── usbd_dfu_core.c
│ │ │ │ │ ├── usbd_dfu_mal.c
│ │ │ │ │ ├── usbd_flash_if.c
│ │ │ │ │ ├── usbd_mem_if_template.c
│ │ │ │ │ └── usbd_otp_if.c
│ │ │ ├── hid
│ │ │ │ ├── inc
│ │ │ │ │ └── usbd_hid_core.h
│ │ │ │ └── src
│ │ │ │ │ └── usbd_hid_core.c
│ │ │ ├── hid_custom
│ │ │ │ ├── inc
│ │ │ │ │ └── usbd_hid_core.h
│ │ │ │ └── src
│ │ │ │ │ └── usbd_hid_core.c
│ │ │ └── msc
│ │ │ │ ├── inc
│ │ │ │ ├── usbd_msc_bot.h
│ │ │ │ ├── usbd_msc_core.h
│ │ │ │ ├── usbd_msc_data.h
│ │ │ │ ├── usbd_msc_mem.h
│ │ │ │ └── usbd_msc_scsi.h
│ │ │ │ └── src
│ │ │ │ ├── usbd_msc_bot.c
│ │ │ │ ├── usbd_msc_core.c
│ │ │ │ ├── usbd_msc_data.c
│ │ │ │ ├── usbd_msc_scsi.c
│ │ │ │ └── usbd_storage_template.c
│ │ ├── Core
│ │ │ ├── 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
│ │ └── Release_Notes.html
│ ├── STM32_USB_HOST_Library
│ │ ├── Class
│ │ │ ├── HID
│ │ │ │ ├── inc
│ │ │ │ │ ├── usbh_hid_core.h
│ │ │ │ │ ├── usbh_hid_keybd.h
│ │ │ │ │ └── usbh_hid_mouse.h
│ │ │ │ └── src
│ │ │ │ │ ├── usbh_hid_core.c
│ │ │ │ │ ├── usbh_hid_keybd.c
│ │ │ │ │ └── usbh_hid_mouse.c
│ │ │ └── MSC
│ │ │ │ ├── inc
│ │ │ │ ├── usbh_msc_bot.h
│ │ │ │ ├── usbh_msc_core.h
│ │ │ │ └── usbh_msc_scsi.h
│ │ │ │ └── src
│ │ │ │ ├── usbh_msc_bot.c
│ │ │ │ ├── usbh_msc_core.c
│ │ │ │ ├── usbh_msc_fatfs.c
│ │ │ │ └── usbh_msc_scsi.c
│ │ ├── Core
│ │ │ ├── inc
│ │ │ │ ├── usbh_conf_template.h
│ │ │ │ ├── usbh_core.h
│ │ │ │ ├── usbh_def.h
│ │ │ │ ├── usbh_hcs.h
│ │ │ │ ├── usbh_ioreq.h
│ │ │ │ └── usbh_stdreq.h
│ │ │ └── src
│ │ │ │ ├── usbh_core.c
│ │ │ │ ├── usbh_hcs.c
│ │ │ │ ├── usbh_ioreq.c
│ │ │ │ └── usbh_stdreq.c
│ │ └── Release_Notes.html
│ └── STM32_USB_OTG_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ ├── usb_bsp.h
│ │ ├── usb_conf_template.h
│ │ ├── usb_core.h
│ │ ├── usb_dcd.h
│ │ ├── usb_dcd_int.h
│ │ ├── usb_defines.h
│ │ ├── usb_hcd.h
│ │ ├── usb_hcd_int.h
│ │ ├── usb_otg.h
│ │ └── usb_regs.h
│ │ └── src
│ │ ├── usb_bsp_template.c
│ │ ├── usb_core.c
│ │ ├── usb_dcd.c
│ │ ├── usb_dcd_int.c
│ │ ├── usb_hcd.c
│ │ ├── usb_hcd_int.c
│ │ └── usb_otg.c
├── Utilities
│ ├── STM32F4-Discovery
│ │ ├── MCD-ST Image SW License Agreement 19Jul2011 v0.1.pdf
│ │ ├── Release_Notes.html
│ │ ├── libPDMFilter_GCC.a
│ │ ├── libPDMFilter_IAR.a
│ │ ├── libPDMFilter_Keil.lib
│ │ ├── pdm_filter.h
│ │ ├── stm32f4_discovery.c
│ │ ├── stm32f4_discovery.h
│ │ ├── stm32f4_discovery_audio_codec.c
│ │ ├── stm32f4_discovery_audio_codec.h
│ │ ├── stm32f4_discovery_lis302dl.c
│ │ └── stm32f4_discovery_lis302dl.h
│ └── Third_Party
│ │ └── fat_fs
│ │ ├── inc
│ │ ├── diskio.h
│ │ ├── fattime.h
│ │ ├── ff.h
│ │ ├── ffconf.h
│ │ └── integer.h
│ │ ├── readme.txt
│ │ └── src
│ │ ├── diskio.c
│ │ ├── fattime.c
│ │ ├── ff.c
│ │ └── option
│ │ ├── ccsbcs.c
│ │ └── syncobj.c
└── adc_test
│ ├── EWARM
│ ├── STM32F4-Discovery.dep
│ ├── STM32F4-Discovery.ewd
│ ├── STM32F4-Discovery.ewp
│ ├── STM32F4-Discovery.eww
│ └── stm32f40x_flash.icf
│ ├── adc_control.c
│ ├── adc_control.h
│ ├── bitbanding.h
│ ├── main.c
│ ├── main.h
│ ├── stm32f4xx_conf.h
│ ├── stm32f4xx_it.c
│ ├── stm32f4xx_it.h
│ └── system_stm32f4xx.c
├── iar_uvc_mjpeg
├── Libraries
│ ├── CMSIS
│ │ ├── Include
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_math.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ └── core_cmInstr.h
│ │ └── ST
│ │ │ └── STM32F4xx
│ │ │ ├── Include
│ │ │ ├── stm32f4xx.h
│ │ │ └── system_stm32f4xx.h
│ │ │ ├── Release_Notes.html
│ │ │ └── Source
│ │ │ └── Templates
│ │ │ ├── TASKING
│ │ │ └── cstart_thumb2.asm
│ │ │ ├── TrueSTUDIO
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── arm
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── gcc_ride7
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── iar
│ │ │ └── startup_stm32f4xx.s
│ │ │ └── system_stm32f4xx.c
│ ├── STM32F4xx_StdPeriph_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ │ ├── misc.h
│ │ │ ├── stm32f4xx_adc.h
│ │ │ ├── stm32f4xx_can.h
│ │ │ ├── stm32f4xx_crc.h
│ │ │ ├── stm32f4xx_cryp.h
│ │ │ ├── stm32f4xx_dac.h
│ │ │ ├── stm32f4xx_dbgmcu.h
│ │ │ ├── stm32f4xx_dcmi.h
│ │ │ ├── stm32f4xx_dma.h
│ │ │ ├── stm32f4xx_exti.h
│ │ │ ├── stm32f4xx_flash.h
│ │ │ ├── stm32f4xx_fsmc.h
│ │ │ ├── stm32f4xx_gpio.h
│ │ │ ├── stm32f4xx_hash.h
│ │ │ ├── stm32f4xx_i2c.h
│ │ │ ├── stm32f4xx_iwdg.h
│ │ │ ├── stm32f4xx_pwr.h
│ │ │ ├── stm32f4xx_rcc.h
│ │ │ ├── stm32f4xx_rng.h
│ │ │ ├── stm32f4xx_rtc.h
│ │ │ ├── stm32f4xx_sdio.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_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_exti.c
│ │ │ ├── stm32f4xx_flash.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_pwr.c
│ │ │ ├── stm32f4xx_rcc.c
│ │ │ ├── stm32f4xx_rng.c
│ │ │ ├── stm32f4xx_rtc.c
│ │ │ ├── stm32f4xx_sdio.c
│ │ │ ├── stm32f4xx_spi.c
│ │ │ ├── stm32f4xx_syscfg.c
│ │ │ ├── stm32f4xx_tim.c
│ │ │ ├── stm32f4xx_usart.c
│ │ │ └── stm32f4xx_wwdg.c
│ ├── STM32_USB_Device_Library
│ │ ├── Class
│ │ │ └── video
│ │ │ │ ├── inc
│ │ │ │ ├── usbd_video_core.h
│ │ │ │ └── uvc.h
│ │ │ │ └── src
│ │ │ │ └── usbd_video_core.c
│ │ └── Core
│ │ │ ├── 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
│ └── STM32_USB_OTG_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ ├── usb_bsp.h
│ │ ├── usb_core.h
│ │ ├── usb_dcd.h
│ │ ├── usb_dcd_int.h
│ │ ├── usb_defines.h
│ │ └── usb_regs.h
│ │ └── src
│ │ ├── usb_core.c
│ │ ├── usb_dcd.c
│ │ └── usb_dcd_int.c
├── Utilities
│ └── STM32F4-Discovery
│ │ ├── Release_Notes.html
│ │ ├── libPDMFilter_GCC.a
│ │ ├── libPDMFilter_IAR.a
│ │ ├── libPDMFilter_Keil.lib
│ │ ├── pdm_filter.h
│ │ ├── stm32f4_discovery.c
│ │ ├── stm32f4_discovery.h
│ │ ├── stm32f4_discovery_audio_codec.c
│ │ ├── stm32f4_discovery_audio_codec.h
│ │ ├── stm32f4_discovery_lis302dl.c
│ │ └── stm32f4_discovery_lis302dl.h
└── iar_uvc_camera
│ ├── EWARM
│ ├── Demo
│ │ ├── Exe
│ │ │ └── STM32F4-Discovery.hex
│ │ └── Obj
│ │ │ ├── STM32F4-Discovery.pbd
│ │ │ └── STM32F4-Discovery.pbd.browse
│ ├── STM32F4-Discovery.dep
│ ├── STM32F4-Discovery.ewd
│ ├── STM32F4-Discovery.ewp
│ ├── STM32F4-Discovery.eww
│ ├── settings
│ │ ├── STM32F4-Discovery.Demo.driver.xcl
│ │ ├── STM32F4-Discovery.Demo.general.xcl
│ │ ├── STM32F4-Discovery.crun
│ │ ├── STM32F4-Discovery.dbgdt
│ │ ├── STM32F4-Discovery.dni
│ │ ├── STM32F4-Discovery.wsdt
│ │ └── STM32F4-Discovery.wspos
│ └── stm32f40x_flash.icf
│ ├── adc_control.c
│ ├── adc_control.h
│ ├── bitbanding.h
│ ├── jprocess.c
│ ├── jprocess.h
│ ├── main.c
│ ├── main.h
│ ├── params.h
│ ├── stdafx.h
│ ├── stm32f4xx_conf.h
│ ├── stm32f4xx_it.c
│ ├── stm32f4xx_it.h
│ ├── system_stm32f4xx.c
│ ├── usb_bsp.c
│ ├── usb_conf.h
│ ├── usbd_conf.h
│ ├── usbd_desc.c
│ ├── usbd_desc.h
│ └── usbd_usr.c
├── iar_uvc_mjpeg_static
├── Libraries
│ ├── CMSIS
│ │ ├── Include
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_math.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ └── core_cmInstr.h
│ │ └── ST
│ │ │ └── STM32F4xx
│ │ │ ├── Include
│ │ │ ├── stm32f4xx.h
│ │ │ └── system_stm32f4xx.h
│ │ │ ├── Release_Notes.html
│ │ │ └── Source
│ │ │ └── Templates
│ │ │ ├── TASKING
│ │ │ └── cstart_thumb2.asm
│ │ │ ├── TrueSTUDIO
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── arm
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── gcc_ride7
│ │ │ └── startup_stm32f4xx.s
│ │ │ ├── iar
│ │ │ └── startup_stm32f4xx.s
│ │ │ └── system_stm32f4xx.c
│ ├── STM32F4xx_StdPeriph_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ │ ├── misc.h
│ │ │ ├── stm32f4xx_adc.h
│ │ │ ├── stm32f4xx_can.h
│ │ │ ├── stm32f4xx_crc.h
│ │ │ ├── stm32f4xx_cryp.h
│ │ │ ├── stm32f4xx_dac.h
│ │ │ ├── stm32f4xx_dbgmcu.h
│ │ │ ├── stm32f4xx_dcmi.h
│ │ │ ├── stm32f4xx_dma.h
│ │ │ ├── stm32f4xx_exti.h
│ │ │ ├── stm32f4xx_flash.h
│ │ │ ├── stm32f4xx_fsmc.h
│ │ │ ├── stm32f4xx_gpio.h
│ │ │ ├── stm32f4xx_hash.h
│ │ │ ├── stm32f4xx_i2c.h
│ │ │ ├── stm32f4xx_iwdg.h
│ │ │ ├── stm32f4xx_pwr.h
│ │ │ ├── stm32f4xx_rcc.h
│ │ │ ├── stm32f4xx_rng.h
│ │ │ ├── stm32f4xx_rtc.h
│ │ │ ├── stm32f4xx_sdio.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_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_exti.c
│ │ │ ├── stm32f4xx_flash.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_pwr.c
│ │ │ ├── stm32f4xx_rcc.c
│ │ │ ├── stm32f4xx_rng.c
│ │ │ ├── stm32f4xx_rtc.c
│ │ │ ├── stm32f4xx_sdio.c
│ │ │ ├── stm32f4xx_spi.c
│ │ │ ├── stm32f4xx_syscfg.c
│ │ │ ├── stm32f4xx_tim.c
│ │ │ ├── stm32f4xx_usart.c
│ │ │ └── stm32f4xx_wwdg.c
│ ├── STM32_USB_Device_Library
│ │ ├── Class
│ │ │ └── video
│ │ │ │ ├── inc
│ │ │ │ ├── usbd_video_core.h
│ │ │ │ └── uvc.h
│ │ │ │ └── src
│ │ │ │ └── usbd_video_core.c
│ │ └── Core
│ │ │ ├── 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
│ └── STM32_USB_OTG_Driver
│ │ ├── Release_Notes.html
│ │ ├── inc
│ │ ├── usb_bsp.h
│ │ ├── usb_core.h
│ │ ├── usb_dcd.h
│ │ ├── usb_dcd_int.h
│ │ ├── usb_defines.h
│ │ └── usb_regs.h
│ │ └── src
│ │ ├── usb_core.c
│ │ ├── usb_dcd.c
│ │ └── usb_dcd_int.c
├── Utilities
│ └── STM32F4-Discovery
│ │ ├── Release_Notes.html
│ │ ├── libPDMFilter_GCC.a
│ │ ├── libPDMFilter_IAR.a
│ │ ├── libPDMFilter_Keil.lib
│ │ ├── pdm_filter.h
│ │ ├── stm32f4_discovery.c
│ │ ├── stm32f4_discovery.h
│ │ ├── stm32f4_discovery_audio_codec.c
│ │ ├── stm32f4_discovery_audio_codec.h
│ │ ├── stm32f4_discovery_lis302dl.c
│ │ └── stm32f4_discovery_lis302dl.h
└── iar_uvc_mjpeg
│ ├── EWARM
│ ├── Demo
│ │ ├── Exe
│ │ │ └── STM32F4-Discovery_Demo.sim
│ │ └── Obj
│ │ │ ├── STM32F4-Discovery.pbd
│ │ │ └── STM32F4-Discovery.pbd.browse
│ ├── STM32F4-Discovery.dep
│ ├── STM32F4-Discovery.ewd
│ ├── STM32F4-Discovery.ewp
│ ├── STM32F4-Discovery.ewt
│ ├── STM32F4-Discovery.eww
│ ├── settings
│ │ ├── STM32F4-Discovery.Demo.driver.xcl
│ │ ├── STM32F4-Discovery.Demo.general.xcl
│ │ ├── STM32F4-Discovery.crun
│ │ ├── STM32F4-Discovery.dbgdt
│ │ ├── STM32F4-Discovery.dni
│ │ ├── STM32F4-Discovery.wsdt
│ │ └── STM32F4-Discovery.wspos
│ └── stm32f40x_flash.icf
│ ├── bmp2.h
│ ├── componentfile.history
│ ├── gray_jpg_test3.h
│ ├── jprocess.c
│ ├── jprocess.h
│ ├── main.c
│ ├── main.h
│ ├── params.h
│ ├── stdafx.h
│ ├── stm32f4xx_conf.h
│ ├── stm32f4xx_it.c
│ ├── stm32f4xx_it.h
│ ├── system_stm32f4xx.c
│ ├── usb_bsp.c
│ ├── usb_conf.h
│ ├── usbd_conf.h
│ ├── usbd_desc.c
│ ├── usbd_desc.h
│ └── usbd_usr.c
└── iar_uvc_nv12
├── Libraries
├── CMSIS
│ ├── Include
│ │ ├── arm_common_tables.h
│ │ ├── arm_math.h
│ │ ├── core_cm0.h
│ │ ├── core_cm3.h
│ │ ├── core_cm4.h
│ │ ├── core_cm4_simd.h
│ │ ├── core_cmFunc.h
│ │ └── core_cmInstr.h
│ └── ST
│ │ └── STM32F4xx
│ │ ├── Include
│ │ ├── stm32f4xx.h
│ │ └── system_stm32f4xx.h
│ │ ├── Release_Notes.html
│ │ └── Source
│ │ └── Templates
│ │ ├── TASKING
│ │ └── cstart_thumb2.asm
│ │ ├── TrueSTUDIO
│ │ └── startup_stm32f4xx.s
│ │ ├── arm
│ │ └── startup_stm32f4xx.s
│ │ ├── gcc_ride7
│ │ └── startup_stm32f4xx.s
│ │ ├── iar
│ │ └── startup_stm32f4xx.s
│ │ └── system_stm32f4xx.c
├── STM32F4xx_StdPeriph_Driver
│ ├── Release_Notes.html
│ ├── inc
│ │ ├── misc.h
│ │ ├── stm32f4xx_adc.h
│ │ ├── stm32f4xx_can.h
│ │ ├── stm32f4xx_crc.h
│ │ ├── stm32f4xx_cryp.h
│ │ ├── stm32f4xx_dac.h
│ │ ├── stm32f4xx_dbgmcu.h
│ │ ├── stm32f4xx_dcmi.h
│ │ ├── stm32f4xx_dma.h
│ │ ├── stm32f4xx_exti.h
│ │ ├── stm32f4xx_flash.h
│ │ ├── stm32f4xx_fsmc.h
│ │ ├── stm32f4xx_gpio.h
│ │ ├── stm32f4xx_hash.h
│ │ ├── stm32f4xx_i2c.h
│ │ ├── stm32f4xx_iwdg.h
│ │ ├── stm32f4xx_pwr.h
│ │ ├── stm32f4xx_rcc.h
│ │ ├── stm32f4xx_rng.h
│ │ ├── stm32f4xx_rtc.h
│ │ ├── stm32f4xx_sdio.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_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_exti.c
│ │ ├── stm32f4xx_flash.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_pwr.c
│ │ ├── stm32f4xx_rcc.c
│ │ ├── stm32f4xx_rng.c
│ │ ├── stm32f4xx_rtc.c
│ │ ├── stm32f4xx_sdio.c
│ │ ├── stm32f4xx_spi.c
│ │ ├── stm32f4xx_syscfg.c
│ │ ├── stm32f4xx_tim.c
│ │ ├── stm32f4xx_usart.c
│ │ └── stm32f4xx_wwdg.c
├── STM32_USB_Device_Library
│ ├── Class
│ │ └── video
│ │ │ ├── inc
│ │ │ ├── usbd_video_core.h
│ │ │ └── uvc.h
│ │ │ └── src
│ │ │ └── usbd_video_core.c
│ └── Core
│ │ ├── 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
└── STM32_USB_OTG_Driver
│ ├── Release_Notes.html
│ ├── inc
│ ├── usb_bsp.h
│ ├── usb_core.h
│ ├── usb_dcd.h
│ ├── usb_dcd_int.h
│ ├── usb_defines.h
│ └── usb_regs.h
│ └── src
│ ├── usb_core.c
│ ├── usb_dcd.c
│ └── usb_dcd_int.c
├── Utilities
└── STM32F4-Discovery
│ ├── Release_Notes.html
│ ├── libPDMFilter_GCC.a
│ ├── libPDMFilter_IAR.a
│ ├── libPDMFilter_Keil.lib
│ ├── pdm_filter.h
│ ├── stm32f4_discovery.c
│ ├── stm32f4_discovery.h
│ ├── stm32f4_discovery_audio_codec.c
│ ├── stm32f4_discovery_audio_codec.h
│ ├── stm32f4_discovery_lis302dl.c
│ └── stm32f4_discovery_lis302dl.h
└── iar_uvc_test
├── EWARM
├── Demo
│ └── Exe
│ │ └── STM32F4-Discovery.hex
├── STM32F4-Discovery.dep
├── STM32F4-Discovery.ewd
├── STM32F4-Discovery.ewp
├── STM32F4-Discovery.eww
├── STM32F4-Discovery.hex
└── stm32f40x_flash.icf
├── main.c
├── main.h
├── stm32f4xx_conf.h
├── stm32f4xx_it.c
├── stm32f4xx_it.h
├── system_stm32f4xx.c
├── test_pic1.h
├── usb_bsp.c
├── usb_conf.h
├── usbd_conf.h
├── usbd_desc.c
├── usbd_desc.h
└── usbd_usr.c
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.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 | # =========================
18 | # Operating System Files
19 | # =========================
20 |
21 | # OSX
22 | # =========================
23 |
24 | .DS_Store
25 | .AppleDouble
26 | .LSOverride
27 |
28 | # Icon must end with two \r
29 | Icon
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | *.apdisk
44 | *.pbi
45 | *.cout
46 | *.bat
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Some USB Device UVC projects for STM32F4-DISCOVERY:
2 |
3 | More information in Russian: https://habr.com/ru/post/245511/
4 |
5 | * iar_uvc_mjpeg/iar_uvc_camera - Analog Video (PAL) is captured, encoded to JPEG and transmitted to PC by USB UVC.
6 | * iar_uvc_nv12/iar_uvc_test - Send a static NV12 image to PC by UVC.
7 | * iar_uvc_mjpeg_static/iar_uvc_mjpeg - Static bmp picture is encoded to JPEG and transmitted to PC by USB UVC.
8 | It is possible to switch between FLASH (bmp image) and RAM (moving circle) as an image source for JPEG encoder.
9 | * iar_adc_test - Capture analog b/w PAL video into STM32F4 RAM.
10 |
11 | Примеры USB Device UVC для STM32F4-DISCOVERY:
12 | * iar_uvc_mjpeg/iar_uvc_camera - Аналоговое видео захватывается, кодируется в JPEG и передается на компьютер с использованием USB UVC.
13 | * iar_uvc_nv12/iar_uvc_test - Передача статической картинки на компьютер с использованием USB UVC.
14 | * iar_uvc_mjpeg_static/iar_uvc_mjpeg - Статическое bmp изображение кодируется в JPEG и передается на компьютер с использованием USB UVC.
15 | * iar_adc_test - Захват аналогового черно-белого сигнала в память STM32F4.
16 |
17 | **If you heed HOST code variant (to capture data from USB camera)**, see my another repo: https://github.com/iliasam/STM32_HOST_UVC_Camera
18 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/CMSIS/Include/arm_common_tables.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 11. November 2010
5 | * $Revision: V1.0.2
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 | * Version 1.0.2 2010/11/11
15 | * Documentation updated.
16 | *
17 | * Version 1.0.1 2010/10/05
18 | * Production release and review comments incorporated.
19 | *
20 | * Version 1.0.0 2010/09/20
21 | * Production release and review comments incorporated.
22 | * -------------------------------------------------------------------- */
23 |
24 | #ifndef _ARM_COMMON_TABLES_H
25 | #define _ARM_COMMON_TABLES_H
26 |
27 | #include "arm_math.h"
28 |
29 | extern uint16_t armBitRevTable[256];
30 | extern q15_t armRecipTableQ15[64];
31 | extern q31_t armRecipTableQ31[64];
32 | extern const q31_t realCoefAQ31[1024];
33 | extern const q31_t realCoefBQ31[1024];
34 |
35 | #endif /* ARM_COMMON_TABLES_H */
36 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/CMSIS/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 30-September-2011
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | *
© COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f4xx_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F4XX_H
34 | #define __SYSTEM_STM32F4XX_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F4xx_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F4xx_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 |
56 | /**
57 | * @}
58 | */
59 |
60 | /** @addtogroup STM32F4xx_System_Exported_Constants
61 | * @{
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 |
68 | /** @addtogroup STM32F4xx_System_Exported_Macros
69 | * @{
70 | */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @addtogroup STM32F4xx_System_Exported_Functions
77 | * @{
78 | */
79 |
80 | extern void SystemInit(void);
81 | extern void SystemCoreClockUpdate(void);
82 | /**
83 | * @}
84 | */
85 |
86 | #ifdef __cplusplus
87 | }
88 | #endif
89 |
90 | #endif /*__SYSTEM_STM32F4XX_H */
91 |
92 | /**
93 | * @}
94 | */
95 |
96 | /**
97 | * @}
98 | */
99 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
100 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.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 CRC firmware
8 | * library.
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 __STM32F4xx_CRC_H
25 | #define __STM32F4xx_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f4xx.h"
33 |
34 | /** @addtogroup STM32F4xx_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /* Exported types ------------------------------------------------------------*/
43 | /* Exported constants --------------------------------------------------------*/
44 |
45 | /** @defgroup CRC_Exported_Constants
46 | * @{
47 | */
48 |
49 | /**
50 | * @}
51 | */
52 |
53 | /* Exported macro ------------------------------------------------------------*/
54 | /* Exported functions --------------------------------------------------------*/
55 |
56 | void CRC_ResetDR(void);
57 | uint32_t CRC_CalcCRC(uint32_t Data);
58 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
59 | uint32_t CRC_GetCRC(void);
60 | void CRC_SetIDRegister(uint8_t IDValue);
61 | uint8_t CRC_GetIDRegister(void);
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif /* __STM32F4xx_CRC_H */
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/audio/inc/usbd_audio_out_if.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_audio_out_if.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header file for the usbd_audio_out_if.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 |
24 | #ifndef __USB_AUDIO_OUT_IF_H_
25 | #define __USB_AUDIO_OUT_IF_H_
26 |
27 | #ifdef STM32F2XX
28 | #include "stm322xg_usb_audio_codec.h"
29 | #elif defined(STM32F10X_CL)
30 | #include "stm3210c_usb_audio_codec.h"
31 | #endif /* STM32F2XX */
32 |
33 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
34 | * @{
35 | */
36 |
37 | /** @defgroup usbd_audio
38 | * @brief This file is the Header file for USBD_audio.c
39 | * @{
40 | */
41 |
42 |
43 | /** @defgroup usbd_audio_Exported_Defines
44 | * @{
45 | */
46 | /* Audio Commands enmueration */
47 | typedef enum
48 | {
49 | AUDIO_CMD_PLAY = 1,
50 | AUDIO_CMD_PAUSE,
51 | AUDIO_CMD_STOP,
52 | }AUDIO_CMD_TypeDef;
53 |
54 | /* Mute commands */
55 | #define AUDIO_MUTE 0x01
56 | #define AUDIO_UNMUTE 0x00
57 |
58 | /* Functions return value */
59 | #define AUDIO_OK 0x00
60 | #define AUDIO_FAIL 0xFF
61 |
62 | /* Audio Machine States */
63 | #define AUDIO_STATE_INACTIVE 0x00
64 | #define AUDIO_STATE_ACTIVE 0x01
65 | #define AUDIO_STATE_PLAYING 0x02
66 | #define AUDIO_STATE_PAUSED 0x03
67 | #define AUDIO_STATE_STOPPED 0x04
68 | #define AUDIO_STATE_ERROR 0x05
69 |
70 | /**
71 | * @}
72 | */
73 |
74 |
75 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
76 | * @{
77 | */
78 | /**
79 | * @}
80 | */
81 |
82 |
83 |
84 | /** @defgroup USBD_CORE_Exported_Macros
85 | * @{
86 | */
87 | /**
88 | * @}
89 | */
90 |
91 | /** @defgroup USBD_CORE_Exported_Variables
92 | * @{
93 | */
94 |
95 | extern AUDIO_FOPS_TypeDef AUDIO_OUT_fops;
96 |
97 | /**
98 | * @}
99 | */
100 |
101 | /** @defgroup USB_CORE_Exported_Functions
102 | * @{
103 | */
104 | /**
105 | * @}
106 | */
107 |
108 | #endif /* __USB_AUDIO_OUT_IF_H_ */
109 | /**
110 | * @}
111 | */
112 |
113 | /**
114 | * @}
115 | */
116 |
117 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
118 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/audio/src/usbd_audio_out_if.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/audio/src/usbd_audio_out_if.c
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/cdc/inc/usbd_cdc_if_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_cdc_if_template.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief Header for dfu_mal.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CDC_IF_TEMPLATE_H
24 | #define __USBD_CDC_IF_TEMPLATE_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #ifdef STM32F2XX
28 | #include "stm32f2xx.h"
29 | #elif defined(STM32F10X_CL)
30 | #include "stm32f10x.h"
31 | #endif /* STM32F2XX */
32 |
33 | #include "usbd_conf.h"
34 | #include "usbd_cdc_core.h"
35 |
36 | /* Exported types ------------------------------------------------------------*/
37 | /* Exported constants --------------------------------------------------------*/
38 |
39 | extern CDC_IF_Prop_TypeDef TEMPLATE_fops;
40 |
41 | /* Exported macro ------------------------------------------------------------*/
42 | /* Exported functions ------------------------------------------------------- */
43 | #endif /* __USBD_CDC_IF_TEMPLATE_H */
44 |
45 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
46 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/dfu/inc/usbd_dfu_mal.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_dfu_mal.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief Header for usbd_dfu_mal.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __DFU_MAL_H
24 | #define __DFU_MAL_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #ifdef STM32F2XX
28 | #include "stm32f2xx.h"
29 | #elif defined(STM32F10X_CL)
30 | #include "stm32f10x.h"
31 | #endif /* STM32F2XX */
32 |
33 | #include "usbd_conf.h"
34 | #include "usbd_dfu_core.h"
35 |
36 | /* Exported types ------------------------------------------------------------*/
37 | typedef struct _DFU_MAL_PROP
38 | {
39 | const uint8_t* pStrDesc;
40 | uint16_t (*pMAL_Init) (void);
41 | uint16_t (*pMAL_DeInit) (void);
42 | uint16_t (*pMAL_Erase) (uint32_t Add);
43 | uint16_t (*pMAL_Write) (uint32_t Add, uint32_t Len);
44 | uint8_t *(*pMAL_Read) (uint32_t Add, uint32_t Len);
45 | uint16_t (*pMAL_CheckAdd) (uint32_t Add);
46 | const uint32_t EraseTiming;
47 | const uint32_t WriteTiming;
48 | }
49 | DFU_MAL_Prop_TypeDef;
50 |
51 |
52 | /* Exported constants --------------------------------------------------------*/
53 | #define MAL_OK 0
54 | #define MAL_FAIL 1
55 |
56 | /* utils macro ---------------------------------------------------------------*/
57 | #define _1st_BYTE(x) (uint8_t)((x)&0xFF) /* 1st addressing cycle */
58 | #define _2nd_BYTE(x) (uint8_t)(((x)&0xFF00)>>8) /* 2nd addressing cycle */
59 | #define _3rd_BYTE(x) (uint8_t)(((x)&0xFF0000)>>16) /* 3rd addressing cycle */
60 | #define _4th_BYTE(x) (uint8_t)(((x)&0xFF000000)>>24) /* 4th addressing cycle */
61 |
62 | /* Exported macro ------------------------------------------------------------*/
63 | #define SET_POLLING_TIMING(x) buffer[1] = _1st_BYTE(x);\
64 | buffer[2] = _2nd_BYTE(x);\
65 | buffer[3] = _3rd_BYTE(x);
66 |
67 | /* Exported functions ------------------------------------------------------- */
68 |
69 | uint16_t MAL_Init (void);
70 | uint16_t MAL_DeInit (void);
71 | uint16_t MAL_Erase (uint32_t SectorAddress);
72 | uint16_t MAL_Write (uint32_t SectorAddress, uint32_t DataLength);
73 | uint8_t *MAL_Read (uint32_t SectorAddress, uint32_t DataLength);
74 | uint16_t MAL_GetStatus(uint32_t SectorAddress ,uint8_t Cmd, uint8_t *buffer);
75 |
76 | extern uint8_t MAL_Buffer[XFERSIZE]; /* RAM Buffer for Downloaded Data */
77 | #endif /* __DFU_MAL_H */
78 |
79 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
80 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/dfu/inc/usbd_flash_if.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_flash_if.h
4 | * @author MCD Application Team
5 | * @version V1.0.0RC1
6 | * @date 18-March-2011
7 | * @brief Header for usbd_flash_if.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __FLASH_IF_MAL_H
24 | #define __FLASH_IF_MAL_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usbd_dfu_mal.h"
28 |
29 | /* Exported types ------------------------------------------------------------*/
30 | /* Exported constants --------------------------------------------------------*/
31 | #define FLASH_START_ADD 0x08000000
32 |
33 | #ifdef STM32F2XX
34 | #define FLASH_END_ADD 0x08100000
35 | #define FLASH_IF_STRING "@Internal Flash /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg"
36 | #elif defined(STM32F10X_CL)
37 | #define FLASH_END_ADD 0x08040000
38 | #define FLASH_IF_STRING "@Internal Flash /0x08000000/06*002Ka,122*002Kg"
39 | #endif /* STM32F2XX */
40 |
41 |
42 | extern DFU_MAL_Prop_TypeDef DFU_Flash_cb;
43 |
44 | /* Exported macro ------------------------------------------------------------*/
45 | /* Exported functions ------------------------------------------------------- */
46 |
47 | #endif /* __FLASH_IF_MAL_H */
48 |
49 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
50 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/dfu/inc/usbd_mem_if_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_mem_if_template.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief Header for usbd_mem_if_template.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __MEM_IF_MAL_H
24 | #define __MEM_IF_MAL_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #ifdef STM32F2XX
28 | #include "stm32f2xx.h"
29 | #endif /* STM32F2XX */
30 | #include "usbd_dfu_mal.h"
31 |
32 | /* Exported types ------------------------------------------------------------*/
33 | /* Exported constants --------------------------------------------------------*/
34 | #define MEM_START_ADD 0x00000000 /* Dummy start address */
35 | #define MEM_END_ADD (uint32_t)(MEM_START_ADD + (5 * 1024)) /* Dummy Size = 5KB */
36 |
37 | #define MEM_IF_STRING "@Dummy Memory /0x00000000/01*002Kg,03*001Kg"
38 |
39 | extern DFU_MAL_Prop_TypeDef DFU_Mem_cb;
40 |
41 | /* Exported macro ------------------------------------------------------------*/
42 | /* Exported functions ------------------------------------------------------- */
43 |
44 | #endif /* __MEM_IF_MAL_H */
45 |
46 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
47 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/dfu/inc/usbd_otp_if.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_otp_if.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief Header for usbd_otp_if.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __OTP_IF_MAL_H
24 | #define __OTP_IF_MAL_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usbd_dfu_mal.h"
28 |
29 | /* Exported types ------------------------------------------------------------*/
30 | /* Exported constants --------------------------------------------------------*/
31 | #define OTP_START_ADD 0x1FFF7800
32 | #define OTP_END_ADD (uint32_t)(OTP_START_ADD + 528)
33 |
34 | #define OTP_IF_STRING "@OTP Area /0x1FFF7800/01*512 g,01*016 g"
35 |
36 | extern DFU_MAL_Prop_TypeDef DFU_Otp_cb;
37 |
38 | /* Exported macro ------------------------------------------------------------*/
39 | /* Exported functions ------------------------------------------------------- */
40 |
41 | #endif /* __OTP_IF_MAL_H */
42 |
43 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
44 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/hid/inc/usbd_hid_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_hid_core.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header file for the usbd_hid_core.c file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 |
24 | #ifndef __USB_HID_CORE_H_
25 | #define __USB_HID_CORE_H_
26 |
27 | #include "usbd_ioreq.h"
28 |
29 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
30 | * @{
31 | */
32 |
33 | /** @defgroup USBD_HID
34 | * @brief This file is the Header file for USBD_msc.c
35 | * @{
36 | */
37 |
38 |
39 | /** @defgroup USBD_HID_Exported_Defines
40 | * @{
41 | */
42 | #define USB_HID_CONFIG_DESC_SIZ 34
43 | #define USB_HID_DESC_SIZ 9
44 | #define HID_MOUSE_REPORT_DESC_SIZE 74
45 |
46 | #define HID_DESCRIPTOR_TYPE 0x21
47 | #define HID_REPORT_DESC 0x22
48 |
49 |
50 | #define HID_REQ_SET_PROTOCOL 0x0B
51 | #define HID_REQ_GET_PROTOCOL 0x03
52 |
53 | #define HID_REQ_SET_IDLE 0x0A
54 | #define HID_REQ_GET_IDLE 0x02
55 |
56 | #define HID_REQ_SET_REPORT 0x09
57 | #define HID_REQ_GET_REPORT 0x01
58 | /**
59 | * @}
60 | */
61 |
62 |
63 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
64 | * @{
65 | */
66 |
67 |
68 | /**
69 | * @}
70 | */
71 |
72 |
73 |
74 | /** @defgroup USBD_CORE_Exported_Macros
75 | * @{
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /** @defgroup USBD_CORE_Exported_Variables
83 | * @{
84 | */
85 |
86 | extern USBD_Class_cb_TypeDef USBD_HID_cb;
87 | /**
88 | * @}
89 | */
90 |
91 | /** @defgroup USB_CORE_Exported_Functions
92 | * @{
93 | */
94 | uint8_t USBD_HID_SendReport (USB_OTG_CORE_HANDLE *pdev,
95 | uint8_t *report,
96 | uint16_t len);
97 | /**
98 | * @}
99 | */
100 |
101 | #endif // __USB_HID_CORE_H_
102 | /**
103 | * @}
104 | */
105 |
106 | /**
107 | * @}
108 | */
109 |
110 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
111 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/hid_custom/src/usbd_hid_core.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/hid_custom/src/usbd_hid_core.c
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_msc_core.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header for the usbd_msc_core.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef _USB_MSC_CORE_H_
24 | #define _USB_MSC_CORE_H_
25 |
26 | #include "usbd_ioreq.h"
27 |
28 | /** @addtogroup USBD_MSC_BOT
29 | * @{
30 | */
31 |
32 | /** @defgroup USBD_MSC
33 | * @brief This file is the Header file for USBD_msc.c
34 | * @{
35 | */
36 |
37 |
38 | /** @defgroup USBD_BOT_Exported_Defines
39 | * @{
40 | */
41 |
42 |
43 | #define BOT_GET_MAX_LUN 0xFE
44 | #define BOT_RESET 0xFF
45 | #define USB_MSC_CONFIG_DESC_SIZ 32
46 |
47 | #define MSC_EPIN_SIZE *(uint16_t *)(((USB_OTG_CORE_HANDLE *)pdev)->dev.pConfig_descriptor + 22)
48 |
49 | #define MSC_EPOUT_SIZE *(uint16_t *)(((USB_OTG_CORE_HANDLE *)pdev)->dev.pConfig_descriptor + 29)
50 |
51 | /**
52 | * @}
53 | */
54 |
55 | /** @defgroup USB_CORE_Exported_Types
56 | * @{
57 | */
58 |
59 | extern USBD_Class_cb_TypeDef USBD_MSC_cb;
60 | /**
61 | * @}
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 | #endif // _USB_MSC_CORE_H_
68 | /**
69 | * @}
70 | */
71 |
72 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
73 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_data.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_msc_data.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header for the usbd_msc_data.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 |
24 | #ifndef _USBD_MSC_DATA_H_
25 | #define _USBD_MSC_DATA_H_
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbd_conf.h"
29 |
30 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
31 | * @{
32 | */
33 |
34 | /** @defgroup USB_INFO
35 | * @brief general defines for the usb device library file
36 | * @{
37 | */
38 |
39 | /** @defgroup USB_INFO_Exported_Defines
40 | * @{
41 | */
42 | #define MODE_SENSE6_LEN 8
43 | #define MODE_SENSE10_LEN 8
44 | #define LENGTH_INQUIRY_PAGE00 7
45 | #define LENGTH_FORMAT_CAPACITIES 20
46 |
47 | /**
48 | * @}
49 | */
50 |
51 |
52 | /** @defgroup USBD_INFO_Exported_TypesDefinitions
53 | * @{
54 | */
55 | /**
56 | * @}
57 | */
58 |
59 |
60 |
61 | /** @defgroup USBD_INFO_Exported_Macros
62 | * @{
63 | */
64 |
65 | /**
66 | * @}
67 | */
68 |
69 | /** @defgroup USBD_INFO_Exported_Variables
70 | * @{
71 | */
72 | extern const uint8_t MSC_Page00_Inquiry_Data[];
73 | extern const uint8_t MSC_Mode_Sense6_data[];
74 | extern const uint8_t MSC_Mode_Sense10_data[] ;
75 |
76 | /**
77 | * @}
78 | */
79 |
80 | /** @defgroup USBD_INFO_Exported_FunctionsPrototype
81 | * @{
82 | */
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | #endif /* _USBD_MSC_DATA_H_ */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/msc/inc/usbd_msc_mem.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_msc_mem.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header for the STORAGE DISK file file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 |
24 | #ifndef __USBD_MEM_H
25 | #define __USBD_MEM_H
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usbd_def.h"
28 |
29 |
30 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
31 | * @{
32 | */
33 |
34 | /** @defgroup USBD_MEM
35 | * @brief header file for the storage disk file
36 | * @{
37 | */
38 |
39 | /** @defgroup USBD_MEM_Exported_Defines
40 | * @{
41 | */
42 | #define USBD_STD_INQUIRY_LENGTH 36
43 | /**
44 | * @}
45 | */
46 |
47 |
48 | /** @defgroup USBD_MEM_Exported_TypesDefinitions
49 | * @{
50 | */
51 |
52 | typedef struct _USBD_STORAGE
53 | {
54 | int8_t (* Init) (uint8_t lun);
55 | int8_t (* GetCapacity) (uint8_t lun, uint32_t *block_num, uint32_t *block_size);
56 | int8_t (* IsReady) (uint8_t lun);
57 | int8_t (* IsWriteProtected) (uint8_t lun);
58 | int8_t (* Read) (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
59 | int8_t (* Write)(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len);
60 | int8_t (* GetMaxLun)(void);
61 | int8_t *pInquiry;
62 |
63 | }USBD_STORAGE_cb_TypeDef;
64 | /**
65 | * @}
66 | */
67 |
68 |
69 |
70 | /** @defgroup USBD_MEM_Exported_Macros
71 | * @{
72 | */
73 |
74 | /**
75 | * @}
76 | */
77 |
78 | /** @defgroup USBD_MEM_Exported_Variables
79 | * @{
80 | */
81 |
82 | /**
83 | * @}
84 | */
85 |
86 | /** @defgroup USBD_MEM_Exported_FunctionsPrototype
87 | * @{
88 | */
89 | extern USBD_STORAGE_cb_TypeDef *USBD_STORAGE_fops;
90 | /**
91 | * @}
92 | */
93 |
94 | #endif /* __USBD_MEM_H */
95 | /**
96 | * @}
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
107 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_msc_data.c
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief This file provides all the vital inquiry pages and sense data.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 | #include "usbd_msc_data.h"
24 |
25 |
26 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
27 | * @{
28 | */
29 |
30 |
31 | /** @defgroup MSC_DATA
32 | * @brief Mass storage info/data module
33 | * @{
34 | */
35 |
36 | /** @defgroup MSC_DATA_Private_TypesDefinitions
37 | * @{
38 | */
39 | /**
40 | * @}
41 | */
42 |
43 |
44 | /** @defgroup MSC_DATA_Private_Defines
45 | * @{
46 | */
47 | /**
48 | * @}
49 | */
50 |
51 |
52 | /** @defgroup MSC_DATA_Private_Macros
53 | * @{
54 | */
55 | /**
56 | * @}
57 | */
58 |
59 |
60 | /** @defgroup MSC_DATA_Private_Variables
61 | * @{
62 | */
63 |
64 |
65 | /* USB Mass storage Page 0 Inquiry Data */
66 | const uint8_t MSC_Page00_Inquiry_Data[] = {//7
67 | 0x00,
68 | 0x00,
69 | 0x00,
70 | (LENGTH_INQUIRY_PAGE00 - 4),
71 | 0x00,
72 | 0x80,
73 | 0x83
74 | };
75 | /* USB Mass storage sense 6 Data */
76 | const uint8_t MSC_Mode_Sense6_data[] = {
77 | 0x00,
78 | 0x00,
79 | 0x00,
80 | 0x00,
81 | 0x00,
82 | 0x00,
83 | 0x00,
84 | 0x00
85 | };
86 | /* USB Mass storage sense 10 Data */
87 | const uint8_t MSC_Mode_Sense10_data[] = {
88 | 0x00,
89 | 0x06,
90 | 0x00,
91 | 0x00,
92 | 0x00,
93 | 0x00,
94 | 0x00,
95 | 0x00
96 | };
97 | /**
98 | * @}
99 | */
100 |
101 |
102 | /** @defgroup MSC_DATA_Private_FunctionPrototypes
103 | * @{
104 | */
105 | /**
106 | * @}
107 | */
108 |
109 |
110 | /** @defgroup MSC_DATA_Private_Functions
111 | * @{
112 | */
113 |
114 | /**
115 | * @}
116 | */
117 |
118 |
119 | /**
120 | * @}
121 | */
122 |
123 |
124 | /**
125 | * @}
126 | */
127 |
128 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
129 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Core/inc/usbd_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf_template.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief usb device configuration template file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CONF__H__
24 | #define __USBD_CONF__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f2xx.h"
28 |
29 |
30 |
31 | /** @defgroup USB_CONF_Exported_Defines
32 | * @{
33 | */
34 | #define USE_USB_OTG_HS
35 |
36 | #define USBD_CFG_MAX_NUM 1
37 | #define USB_MAX_STR_DESC_SIZ 64
38 | #define USBD_EP0_MAX_PACKET_SIZE 64
39 |
40 | /**
41 | * @}
42 | */
43 |
44 |
45 | /** @defgroup USB_CONF_Exported_Types
46 | * @{
47 | */
48 | /**
49 | * @}
50 | */
51 |
52 |
53 | /** @defgroup USB_CONF_Exported_Macros
54 | * @{
55 | */
56 | /**
57 | * @}
58 | */
59 |
60 | /** @defgroup USB_CONF_Exported_Variables
61 | * @{
62 | */
63 | /**
64 | * @}
65 | */
66 |
67 | /** @defgroup USB_CONF_Exported_FunctionsPrototype
68 | * @{
69 | */
70 | /**
71 | * @}
72 | */
73 |
74 |
75 | #endif //__USBD_CONF__H__
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
79 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Core/inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief Header file for usbd_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CORE_H
24 | #define __USBD_CORE_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usb_dcd.h"
28 | #include "usbd_def.h"
29 | #include "usbd_conf.h"
30 |
31 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 | /** @defgroup USBD_CORE
36 | * @brief This file is the Header file for usbd_core.c file
37 | * @{
38 | */
39 |
40 |
41 | /** @defgroup USBD_CORE_Exported_Defines
42 | * @{
43 | */
44 |
45 | typedef enum {
46 | USBD_OK = 0,
47 | USBD_BUSY,
48 | USBD_FAIL,
49 | }USBD_Status;
50 | /**
51 | * @}
52 | */
53 |
54 |
55 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
56 | * @{
57 | */
58 |
59 |
60 | /**
61 | * @}
62 | */
63 |
64 |
65 |
66 | /** @defgroup USBD_CORE_Exported_Macros
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup USBD_CORE_Exported_Variables
75 | * @{
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype
83 | * @{
84 | */
85 | void USBD_Init(USB_OTG_CORE_HANDLE *pdev,
86 | USB_OTG_CORE_ID_TypeDef coreID,
87 | USBD_DEVICE *pDevice,
88 | USBD_Class_cb_TypeDef *class_cb,
89 | USBD_Usr_cb_TypeDef *usr_cb);
90 |
91 | USBD_Status USBD_DeInit(USB_OTG_CORE_HANDLE *pdev);
92 |
93 | USBD_Status USBD_ClrCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx);
94 |
95 | USBD_Status USBD_SetCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx);
96 |
97 | /**
98 | * @}
99 | */
100 |
101 | #endif /* __USBD_CORE_H */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Core/inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header file for the usbd_ioreq.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 |
24 | #ifndef __USBD_IOREQ_H_
25 | #define __USBD_IOREQ_H_
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbd_def.h"
29 | #include "usbd_core.h"
30 |
31 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 | /** @defgroup USBD_IOREQ
36 | * @brief header file for the usbd_ioreq.c file
37 | * @{
38 | */
39 |
40 | /** @defgroup USBD_IOREQ_Exported_Defines
41 | * @{
42 | */
43 | /**
44 | * @}
45 | */
46 |
47 |
48 | /** @defgroup USBD_IOREQ_Exported_Types
49 | * @{
50 | */
51 |
52 |
53 | /**
54 | * @}
55 | */
56 |
57 |
58 |
59 | /** @defgroup USBD_IOREQ_Exported_Macros
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @defgroup USBD_IOREQ_Exported_Variables
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype
76 | * @{
77 | */
78 |
79 | USBD_Status USBD_CtlSendData (USB_OTG_CORE_HANDLE *pdev,
80 | uint8_t *buf,
81 | uint16_t len);
82 |
83 | USBD_Status USBD_CtlContinueSendData (USB_OTG_CORE_HANDLE *pdev,
84 | uint8_t *pbuf,
85 | uint16_t len);
86 |
87 | USBD_Status USBD_CtlPrepareRx (USB_OTG_CORE_HANDLE *pdev,
88 | uint8_t *pbuf,
89 | uint16_t len);
90 |
91 | USBD_Status USBD_CtlContinueRx (USB_OTG_CORE_HANDLE *pdev,
92 | uint8_t *pbuf,
93 | uint16_t len);
94 |
95 | USBD_Status USBD_CtlSendStatus (USB_OTG_CORE_HANDLE *pdev);
96 |
97 | USBD_Status USBD_CtlReceiveStatus (USB_OTG_CORE_HANDLE *pdev);
98 |
99 | uint16_t USBD_GetRxCount (USB_OTG_CORE_HANDLE *pdev ,
100 | uint8_t epnum);
101 |
102 | /**
103 | * @}
104 | */
105 |
106 | #endif /* __USBD_IOREQ_H_ */
107 |
108 | /**
109 | * @}
110 | */
111 |
112 | /**
113 | * @}
114 | */
115 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
116 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_Device_Library/Core/inc/usbd_req.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief header file for the usbd_req.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 |
24 | #ifndef __USB_REQUEST_H_
25 | #define __USB_REQUEST_H_
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbd_def.h"
29 | #include "usbd_core.h"
30 | #include "usbd_conf.h"
31 |
32 |
33 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
34 | * @{
35 | */
36 |
37 | /** @defgroup USBD_REQ
38 | * @brief header file for the usbd_ioreq.c file
39 | * @{
40 | */
41 |
42 | /** @defgroup USBD_REQ_Exported_Defines
43 | * @{
44 | */
45 | /**
46 | * @}
47 | */
48 |
49 |
50 | /** @defgroup USBD_REQ_Exported_Types
51 | * @{
52 | */
53 | /**
54 | * @}
55 | */
56 |
57 |
58 |
59 | /** @defgroup USBD_REQ_Exported_Macros
60 | * @{
61 | */
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup USBD_REQ_Exported_Variables
67 | * @{
68 | */
69 | /**
70 | * @}
71 | */
72 |
73 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype
74 | * @{
75 | */
76 |
77 | USBD_Status USBD_StdDevReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
78 | USBD_Status USBD_StdItfReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
79 | USBD_Status USBD_StdEPReq (USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req);
80 | void USBD_ParseSetupRequest( USB_OTG_CORE_HANDLE *pdev,
81 | USB_SETUP_REQ *req);
82 |
83 | void USBD_CtlError( USB_OTG_CORE_HANDLE *pdev,
84 | USB_SETUP_REQ *req);
85 |
86 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
87 | /**
88 | * @}
89 | */
90 |
91 | #endif /* __USB_REQUEST_H_ */
92 |
93 | /**
94 | * @}
95 | */
96 |
97 | /**
98 | * @}
99 | */
100 |
101 |
102 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
103 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_HOST_Library/Class/HID/inc/usbh_hid_keybd.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbh_hid_keybd.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief This file contains all the prototypes for the usbh_hid_keybd.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive -----------------------------------------------*/
23 | #ifndef __USBH_HID_KEYBD_H
24 | #define __USBH_HID_KEYBD_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usb_conf.h"
28 | #include "usbh_hid_core.h"
29 |
30 | /** @addtogroup USBH_LIB
31 | * @{
32 | */
33 |
34 | /** @addtogroup USBH_CLASS
35 | * @{
36 | */
37 |
38 | /** @addtogroup USBH_HID_CLASS
39 | * @{
40 | */
41 |
42 | /** @defgroup USBH_HID_KEYBD
43 | * @brief This file is the Header file for USBH_HID_KEYBD.c
44 | * @{
45 | */
46 |
47 |
48 | /** @defgroup USBH_HID_KEYBD_Exported_Types
49 | * @{
50 | */
51 |
52 |
53 | /**
54 | * @}
55 | */
56 |
57 | /** @defgroup USBH_HID_KEYBD_Exported_Defines
58 | * @{
59 | */
60 | //#define QWERTY_KEYBOARD
61 | #define AZERTY_KEYBOARD
62 |
63 | #define KBD_LEFT_CTRL 0x01
64 | #define KBD_LEFT_SHIFT 0x02
65 | #define KBD_LEFT_ALT 0x04
66 | #define KBD_LEFT_GUI 0x08
67 | #define KBD_RIGHT_CTRL 0x10
68 | #define KBD_RIGHT_SHIFT 0x20
69 | #define KBD_RIGHT_ALT 0x40
70 | #define KBD_RIGHT_GUI 0x80
71 |
72 | #define KBR_MAX_NBR_PRESSED 6
73 |
74 | /**
75 | * @}
76 | */
77 |
78 | /** @defgroup USBH_HID_KEYBD_Exported_Macros
79 | * @{
80 | */
81 | /**
82 | * @}
83 | */
84 |
85 | /** @defgroup USBH_HID_KEYBD_Exported_Variables
86 | * @{
87 | */
88 |
89 | extern HID_cb_TypeDef HID_KEYBRD_cb;
90 | /**
91 | * @}
92 | */
93 |
94 | /** @defgroup USBH_HID_KEYBD_Exported_FunctionsPrototype
95 | * @{
96 | */
97 | void USR_KEYBRD_Init (void);
98 | void USR_KEYBRD_ProcessData (uint8_t pbuf);
99 | /**
100 | * @}
101 | */
102 |
103 | #endif /* __USBH_HID_KEYBD_H */
104 |
105 | /**
106 | * @}
107 | */
108 |
109 | /**
110 | * @}
111 | */
112 |
113 | /**
114 | * @}
115 | */
116 |
117 | /**
118 | * @}
119 | */
120 |
121 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
122 |
123 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_HOST_Library/Class/HID/inc/usbh_hid_mouse.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbh_hid_mouse.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief This file contains all the prototypes for the usbh_hid_mouse.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 |
23 | /* Define to prevent recursive ----------------------------------------------*/
24 | #ifndef __USBH_HID_MOUSE_H
25 | #define __USBH_HID_MOUSE_H
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbh_hid_core.h"
29 |
30 | /** @addtogroup USBH_LIB
31 | * @{
32 | */
33 |
34 | /** @addtogroup USBH_CLASS
35 | * @{
36 | */
37 |
38 | /** @addtogroup USBH_HID_CLASS
39 | * @{
40 | */
41 |
42 | /** @defgroup USBH_HID_MOUSE
43 | * @brief This file is the Header file for USBH_HID_MOUSE.c
44 | * @{
45 | */
46 |
47 |
48 | /** @defgroup USBH_HID_MOUSE_Exported_Types
49 | * @{
50 | */
51 | typedef struct _HID_MOUSE_Data
52 | {
53 | uint8_t x;
54 | uint8_t y;
55 | uint8_t z; /* Not Supported */
56 | uint8_t button;
57 | }
58 | HID_MOUSE_Data_TypeDef;
59 |
60 | /**
61 | * @}
62 | */
63 |
64 | /** @defgroup USBH_HID_MOUSE_Exported_Defines
65 | * @{
66 | */
67 | /**
68 | * @}
69 | */
70 |
71 | /** @defgroup USBH_HID_MOUSE_Exported_Macros
72 | * @{
73 | */
74 | /**
75 | * @}
76 | */
77 |
78 | /** @defgroup USBH_HID_MOUSE_Exported_Variables
79 | * @{
80 | */
81 |
82 | extern HID_cb_TypeDef HID_MOUSE_cb;
83 | extern HID_MOUSE_Data_TypeDef HID_MOUSE_Data;
84 | /**
85 | * @}
86 | */
87 |
88 | /** @defgroup USBH_HID_MOUSE_Exported_FunctionsPrototype
89 | * @{
90 | */
91 | void USR_MOUSE_Init (void);
92 | void USR_MOUSE_ProcessData (HID_MOUSE_Data_TypeDef *data);
93 | /**
94 | * @}
95 | */
96 |
97 | #endif /* __USBH_HID_MOUSE_H */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
115 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_HOST_Library/Class/MSC/inc/usbh_msc_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbh_msc_core.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief This file contains all the prototypes for the usbh_msc_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive ----------------------------------------------*/
23 | #ifndef __USBH_MSC_CORE_H
24 | #define __USBH_MSC_CORE_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usbh_core.h"
28 | #include "usbh_stdreq.h"
29 | #include "usb_bsp.h"
30 | #include "usbh_ioreq.h"
31 | #include "usbh_hcs.h"
32 | #include "usbh_msc_core.h"
33 | #include "usbh_msc_scsi.h"
34 | #include "usbh_msc_bot.h"
35 |
36 | /** @addtogroup USBH_LIB
37 | * @{
38 | */
39 |
40 | /** @addtogroup USBH_CLASS
41 | * @{
42 | */
43 |
44 | /** @addtogroup USBH_MSC_CLASS
45 | * @{
46 | */
47 |
48 | /** @defgroup USBH_MSC_CORE
49 | * @brief This file is the Header file for usbh_msc_core.c
50 | * @{
51 | */
52 |
53 |
54 | /** @defgroup USBH_MSC_CORE_Exported_Types
55 | * @{
56 | */
57 |
58 |
59 | /* Structure for MSC process */
60 | typedef struct _MSC_Process
61 | {
62 | uint8_t hc_num_in;
63 | uint8_t hc_num_out;
64 | uint8_t MSBulkOutEp;
65 | uint8_t MSBulkInEp;
66 | uint16_t MSBulkInEpSize;
67 | uint16_t MSBulkOutEpSize;
68 | uint8_t buff[USBH_MSC_MPS_SIZE];
69 | uint8_t maxLun;
70 | }
71 | MSC_Machine_TypeDef;
72 |
73 |
74 | /**
75 | * @}
76 | */
77 |
78 |
79 |
80 | /** @defgroup USBH_MSC_CORE_Exported_Defines
81 | * @{
82 | */
83 |
84 | #define USB_REQ_BOT_RESET 0xFF
85 | #define USB_REQ_GET_MAX_LUN 0xFE
86 |
87 |
88 | /**
89 | * @}
90 | */
91 |
92 | /** @defgroup USBH_MSC_CORE_Exported_Macros
93 | * @{
94 | */
95 | /**
96 | * @}
97 | */
98 |
99 | /** @defgroup USBH_MSC_CORE_Exported_Variables
100 | * @{
101 | */
102 | extern USBH_Class_cb_TypeDef USBH_MSC_cb;
103 | extern MSC_Machine_TypeDef MSC_Machine;
104 | extern uint8_t MSCErrorCount;
105 |
106 | /**
107 | * @}
108 | */
109 |
110 | /** @defgroup USBH_MSC_CORE_Exported_FunctionsPrototype
111 | * @{
112 | */
113 |
114 |
115 |
116 | /**
117 | * @}
118 | */
119 |
120 | #endif /* __USBH_MSC_CORE_H */
121 |
122 |
123 | /**
124 | * @}
125 | */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /**
132 | * @}
133 | */
134 |
135 | /**
136 | * @}
137 | */
138 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_HOST_Library/Core/inc/usbh_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbh_conf_template
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief General USB Host library configuration
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBH_CONF__H__
24 | #define __USBH_CONF__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | /** @addtogroup USBH_OTG_DRIVER
28 | * @{
29 | */
30 |
31 | /** @defgroup USBH_CONF
32 | * @brief usb otg low level driver configuration file
33 | * @{
34 | */
35 |
36 | /** @defgroup USBH_CONF_Exported_Defines
37 | * @{
38 | */
39 |
40 | #define USBH_MAX_NUM_ENDPOINTS 2
41 | #define USBH_MAX_NUM_INTERFACES 2
42 | #ifdef USE_USB_OTG_FS
43 | #define USBH_MSC_MPS_SIZE 0x40
44 | #else
45 | #define USBH_MSC_MPS_SIZE 0x200
46 | #endif
47 |
48 | /**
49 | * @}
50 | */
51 |
52 |
53 | /** @defgroup USBH_CONF_Exported_Types
54 | * @{
55 | */
56 | /**
57 | * @}
58 | */
59 |
60 |
61 | /** @defgroup USBH_CONF_Exported_Macros
62 | * @{
63 | */
64 | /**
65 | * @}
66 | */
67 |
68 | /** @defgroup USBH_CONF_Exported_Variables
69 | * @{
70 | */
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup USBH_CONF_Exported_FunctionsPrototype
76 | * @{
77 | */
78 | /**
79 | * @}
80 | */
81 |
82 |
83 | #endif //__USBH_CONF__H__
84 |
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
94 |
95 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_HOST_Library/Core/inc/usbh_hcs.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbh_hcs.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief Header file for usbh_hcs.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive ----------------------------------------------*/
23 | #ifndef __USBH_HCS_H
24 | #define __USBH_HCS_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usbh_core.h"
28 |
29 |
30 |
31 | /** @addtogroup USBH_LIB
32 | * @{
33 | */
34 |
35 | /** @addtogroup USBH_LIB_CORE
36 | * @{
37 | */
38 |
39 | /** @defgroup USBH_HCS
40 | * @brief This file is the header file for usbh_hcs.c
41 | * @{
42 | */
43 |
44 | /** @defgroup USBH_HCS_Exported_Defines
45 | * @{
46 | */
47 | #define HC_MAX 8
48 |
49 | #define HC_OK 0x0000
50 | #define HC_USED 0x8000
51 | #define HC_ERROR 0xFFFF
52 | #define HC_USED_MASK 0x7FFF
53 | /**
54 | * @}
55 | */
56 |
57 | /** @defgroup USBH_HCS_Exported_Types
58 | * @{
59 | */
60 | /**
61 | * @}
62 | */
63 |
64 |
65 | /** @defgroup USBH_HCS_Exported_Macros
66 | * @{
67 | */
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBH_HCS_Exported_Variables
73 | * @{
74 | */
75 | /**
76 | * @}
77 | */
78 |
79 | /** @defgroup USBH_HCS_Exported_FunctionsPrototype
80 | * @{
81 | */
82 |
83 | uint8_t USBH_Alloc_Channel(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr);
84 |
85 | uint8_t USBH_Free_Channel (USB_OTG_CORE_HANDLE *pdev, uint8_t idx);
86 |
87 | uint8_t USBH_DeAllocate_AllChannel (USB_OTG_CORE_HANDLE *pdev);
88 |
89 | uint8_t USBH_Open_Channel (USB_OTG_CORE_HANDLE *pdev,
90 | uint8_t ch_num,
91 | uint8_t dev_address,
92 | uint8_t speed,
93 | uint8_t ep_type,
94 | uint16_t mps);
95 |
96 | uint8_t USBH_Modify_Channel (USB_OTG_CORE_HANDLE *pdev,
97 | uint8_t hc_num,
98 | uint8_t dev_address,
99 | uint8_t speed,
100 | uint8_t ep_type,
101 | uint16_t mps);
102 | /**
103 | * @}
104 | */
105 |
106 |
107 |
108 | #endif /* __USBH_HCS_H */
109 |
110 |
111 | /**
112 | * @}
113 | */
114 |
115 | /**
116 | * @}
117 | */
118 |
119 | /**
120 | * @}
121 | */
122 |
123 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
124 |
125 |
126 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USB_BSP__H__
24 | #define __USB_BSP__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usb_core.h"
28 | #include "stm32f4_discovery.h"
29 |
30 | /** @addtogroup USB_OTG_DRIVER
31 | * @{
32 | */
33 |
34 | /** @defgroup USB_BSP
35 | * @brief This file is the
36 | * @{
37 | */
38 |
39 |
40 | /** @defgroup USB_BSP_Exported_Defines
41 | * @{
42 | */
43 | /**
44 | * @}
45 | */
46 |
47 |
48 | /** @defgroup USB_BSP_Exported_Types
49 | * @{
50 | */
51 | /**
52 | * @}
53 | */
54 |
55 |
56 | /** @defgroup USB_BSP_Exported_Macros
57 | * @{
58 | */
59 | /**
60 | * @}
61 | */
62 |
63 | /** @defgroup USB_BSP_Exported_Variables
64 | * @{
65 | */
66 | /**
67 | * @}
68 | */
69 |
70 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
71 | * @{
72 | */
73 | void BSP_Init(void);
74 |
75 | void USB_OTG_BSP_Init (USB_OTG_CORE_HANDLE *pdev);
76 | void USB_OTG_BSP_uDelay (const uint32_t usec);
77 | void USB_OTG_BSP_mDelay (const uint32_t msec);
78 | void USB_OTG_BSP_EnableInterrupt (USB_OTG_CORE_HANDLE *pdev);
79 | #ifdef USE_HOST_MODE
80 | void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev);
81 | void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev,uint8_t state);
82 | #endif
83 | /**
84 | * @}
85 | */
86 |
87 | #endif //__USB_BSP__H__
88 |
89 | /**
90 | * @}
91 | */
92 |
93 | /**
94 | * @}
95 | */
96 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
97 |
98 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_OTG_Driver/inc/usb_hcd.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_hcd.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief Host layer Header file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USB_HCD_H__
24 | #define __USB_HCD_H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "usb_regs.h"
28 | #include "usb_core.h"
29 |
30 |
31 | /** @addtogroup USB_OTG_DRIVER
32 | * @{
33 | */
34 |
35 | /** @defgroup USB_HCD
36 | * @brief This file is the
37 | * @{
38 | */
39 |
40 |
41 | /** @defgroup USB_HCD_Exported_Defines
42 | * @{
43 | */
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @defgroup USB_HCD_Exported_Types
50 | * @{
51 | */
52 | /**
53 | * @}
54 | */
55 |
56 |
57 | /** @defgroup USB_HCD_Exported_Macros
58 | * @{
59 | */
60 | /**
61 | * @}
62 | */
63 |
64 | /** @defgroup USB_HCD_Exported_Variables
65 | * @{
66 | */
67 | /**
68 | * @}
69 | */
70 |
71 | /** @defgroup USB_HCD_Exported_FunctionsPrototype
72 | * @{
73 | */
74 | uint32_t HCD_Init (USB_OTG_CORE_HANDLE *pdev ,
75 | USB_OTG_CORE_ID_TypeDef coreID);
76 | uint32_t HCD_HC_Init (USB_OTG_CORE_HANDLE *pdev ,
77 | uint8_t hc_num);
78 | uint32_t HCD_SubmitRequest (USB_OTG_CORE_HANDLE *pdev ,
79 | uint8_t hc_num) ;
80 | uint32_t HCD_GetCurrentSpeed (USB_OTG_CORE_HANDLE *pdev);
81 | uint32_t HCD_ResetPort (USB_OTG_CORE_HANDLE *pdev);
82 | uint32_t HCD_IsDeviceConnected (USB_OTG_CORE_HANDLE *pdev);
83 | uint32_t HCD_GetCurrentFrame (USB_OTG_CORE_HANDLE *pdev) ;
84 | URB_STATE HCD_GetURB_State (USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num);
85 | uint32_t HCD_GetXferCnt (USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num);
86 | HC_STATUS HCD_GetHCState (USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num) ;
87 | /**
88 | * @}
89 | */
90 |
91 | #endif //__USB_HCD_H__
92 |
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /**
99 | * @}
100 | */
101 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
102 |
103 |
--------------------------------------------------------------------------------
/iar_adc_test/Libraries/STM32_USB_OTG_Driver/inc/usb_otg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_otg.h
4 | * @author MCD Application Team
5 | * @version V2.0.0
6 | * @date 22-July-2011
7 | * @brief OTG Core Header
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USB_OTG__
24 | #define __USB_OTG__
25 |
26 |
27 | /** @addtogroup USB_OTG_DRIVER
28 | * @{
29 | */
30 |
31 | /** @defgroup USB_OTG
32 | * @brief This file is the
33 | * @{
34 | */
35 |
36 |
37 | /** @defgroup USB_OTG_Exported_Defines
38 | * @{
39 | */
40 |
41 |
42 | void USB_OTG_InitiateSRP(void);
43 | void USB_OTG_InitiateHNP(uint8_t state , uint8_t mode);
44 | void USB_OTG_Switchback (USB_OTG_CORE_HANDLE *pdev);
45 | uint32_t USB_OTG_GetCurrentState (USB_OTG_CORE_HANDLE *pdev);
46 |
47 | uint32_t STM32_USBO_OTG_ISR_Handler(USB_OTG_CORE_HANDLE *pdev);
48 | /**
49 | * @}
50 | */
51 |
52 |
53 | /** @defgroup USB_OTG_Exported_Types
54 | * @{
55 | */
56 | /**
57 | * @}
58 | */
59 |
60 |
61 | /** @defgroup USB_OTG_Exported_Macros
62 | * @{
63 | */
64 | /**
65 | * @}
66 | */
67 |
68 | /** @defgroup USB_OTG_Exported_Variables
69 | * @{
70 | */
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup USB_OTG_Exported_FunctionsPrototype
76 | * @{
77 | */
78 | /**
79 | * @}
80 | */
81 |
82 |
83 | #endif //__USB_OTG__
84 |
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
94 |
95 |
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/MCD-ST Image SW License Agreement 19Jul2011 v0.1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Utilities/STM32F4-Discovery/MCD-ST Image SW License Agreement 19Jul2011 v0.1.pdf
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/pdm_filter.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file pdm_filter.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 28-October-2011
7 | * @brief Header file for PDM audio software decoding Library.
8 | * This Library is used to decode and reconstruct the audio signal
9 | * produced by MP45DT02 MEMS microphone from STMicroelectronics.
10 | * For more details about this Library, please refer to document
11 | * "PDM audio software decoding on STM32 microcontrollers (AN3998)".
12 | ******************************************************************************
13 | * @attention
14 | *
15 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
16 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
17 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
18 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
19 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
20 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
21 | *
22 | * © COPYRIGHT 2011 STMicroelectronics
23 | ******************************************************************************
24 | */
25 |
26 | /* Define to prevent recursive inclusion -------------------------------------*/
27 | #ifndef __PDM_FILTER_H
28 | #define __PDM_FILTER_H
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | /* Includes ------------------------------------------------------------------*/
35 | #include
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 | typedef struct {
39 | uint16_t Fs;
40 | float LP_HZ;
41 | float HP_HZ;
42 | uint16_t In_MicChannels;
43 | uint16_t Out_MicChannels;
44 | char InternalFilter[34];
45 | } PDMFilter_InitStruct;
46 |
47 | /* Exported constants --------------------------------------------------------*/
48 | /* Exported macros -----------------------------------------------------------*/
49 | #define HTONS(A) ((((u16)(A) & 0xff00) >> 8) | \
50 | (((u16)(A) & 0x00ff) << 8))
51 |
52 | /* Exported functions ------------------------------------------------------- */
53 | void PDM_Filter_Init(PDMFilter_InitStruct * Filter);
54 |
55 | int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
56 | int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
57 | int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
58 | int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /* __PDM_FILTER_H */
65 |
66 | /*******************(C)COPYRIGHT 2011 STMicroelectronics *****END OF FILE******/
67 |
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/Third_Party/fat_fs/inc/diskio.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------
2 | / Low level disk interface modlue include file R0.07 (C)ChaN, 2009
3 | /-----------------------------------------------------------------------*/
4 |
5 | #ifndef _DISKIO
6 |
7 | #define _READONLY 0 /* 1: Read-only mode */
8 | #define _USE_IOCTL 1
9 |
10 | #include "integer.h"
11 | #include "usbh_msc_core.h"
12 |
13 | /* Status of Disk Functions */
14 | typedef BYTE DSTATUS;
15 |
16 | /* Results of Disk Functions */
17 | typedef enum {
18 | RES_OK = 0, /* 0: Successful */
19 | RES_ERROR, /* 1: R/W Error */
20 | RES_WRPRT, /* 2: Write Protected */
21 | RES_NOTRDY, /* 3: Not Ready */
22 | RES_PARERR /* 4: Invalid Parameter */
23 | } DRESULT;
24 |
25 |
26 | /*---------------------------------------*/
27 | /* Prototypes for disk control functions */
28 |
29 | BOOL assign_drives (int argc, char *argv[]);
30 | DSTATUS disk_initialize (BYTE);
31 | DSTATUS disk_status (BYTE);
32 | DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
33 | #if _READONLY == 0
34 | DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
35 | #endif
36 | DRESULT disk_ioctl (BYTE, BYTE, void*);
37 |
38 |
39 |
40 | /* Disk Status Bits (DSTATUS) */
41 |
42 | #define STA_NOINIT 0x01 /* Drive not initialized */
43 | #define STA_NODISK 0x02 /* No medium in the drive */
44 | #define STA_PROTECT 0x04 /* Write protected */
45 |
46 |
47 | /* Command code for disk_ioctrl() */
48 |
49 | /* Generic command */
50 | #define CTRL_SYNC 0 /* Mandatory for write functions */
51 | #define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */
52 | #define GET_SECTOR_SIZE 2
53 | #define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */
54 | #define CTRL_POWER 4
55 | #define CTRL_LOCK 5
56 | #define CTRL_EJECT 6
57 | /* MMC/SDC command */
58 | #define MMC_GET_TYPE 10
59 | #define MMC_GET_CSD 11
60 | #define MMC_GET_CID 12
61 | #define MMC_GET_OCR 13
62 | #define MMC_GET_SDSTAT 14
63 | /* ATA/CF command */
64 | #define ATA_GET_REV 20
65 | #define ATA_GET_MODEL 21
66 | #define ATA_GET_SN 22
67 |
68 | #define _DISKIO
69 | #endif
70 |
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/Third_Party/fat_fs/inc/fattime.h:
--------------------------------------------------------------------------------
1 | #ifndef FATTIME_H_
2 |
3 | #include "integer.h"
4 |
5 | DWORD get_fattime (void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/Third_Party/fat_fs/inc/integer.h:
--------------------------------------------------------------------------------
1 | /*-------------------------------------------*/
2 | /* Integer type definitions for FatFs module */
3 | /*-------------------------------------------*/
4 |
5 | #ifndef _INTEGER
6 |
7 | #if 0
8 | #include
9 | #else
10 |
11 | #include "usb_conf.h"
12 |
13 | /* These types must be 16-bit, 32-bit or larger integer */
14 | typedef int INT;
15 | typedef unsigned int UINT;
16 |
17 | /* These types must be 8-bit integer */
18 | typedef signed char CHAR;
19 | typedef unsigned char UCHAR;
20 | typedef unsigned char BYTE;
21 |
22 | /* These types must be 16-bit integer */
23 | typedef short SHORT;
24 | typedef unsigned short USHORT;
25 | typedef unsigned short WORD;
26 | typedef unsigned short WCHAR;
27 |
28 | /* These types must be 32-bit integer */
29 | typedef long LONG;
30 | typedef unsigned long ULONG;
31 | typedef unsigned long DWORD;
32 |
33 | /* Boolean type */
34 | // typedef enum { FALSE = 0, TRUE } BOOL;
35 | #include
36 | typedef bool BOOL;
37 | #ifndef FALSE
38 | #define FALSE false
39 | #define TRUE true
40 | #endif
41 |
42 |
43 | #endif
44 |
45 | #define _INTEGER
46 | #endif
47 |
--------------------------------------------------------------------------------
/iar_adc_test/Utilities/Third_Party/fat_fs/src/fattime.c:
--------------------------------------------------------------------------------
1 |
2 |
3 | #include "integer.h"
4 | #include "fattime.h"
5 | //#include "rtc.h" //RPi
6 |
7 | DWORD get_fattime (void)
8 | {
9 | return 0;
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/EWARM/STM32F4-Discovery.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\STM32F4-Discovery.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/EWARM/stm32f40x_flash.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__ = 0x080FFFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20020000;
11 | define symbol __ICFEDIT_region_RAMCCM_start__ = 0x10000000;
12 | define symbol __ICFEDIT_region_RAMCCM_end__ = 0x1000FFFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x400;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
22 | define region CCMRAM_region = mem:[from __ICFEDIT_region_RAMCCM_start__ to __ICFEDIT_region_RAMCCM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
35 | place in CCMRAM_region {section .ccmram};
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/adc_control.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/adc_test/adc_control.c
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/adc_control.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/adc_test/adc_control.h
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/bitbanding.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/adc_test/bitbanding.h
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_adc_test/adc_test/main.c
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/main.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file main.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief Header for main.c module
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4_DISCOVERY_DEMO_H
24 | #define __STM32F4_DISCOVERY_DEMO_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 | #include
29 |
30 | /* Exported types ------------------------------------------------------------*/
31 | /* Exported constants --------------------------------------------------------*/
32 | /* TIM2 Autoreload and Capture Compare register values */
33 | #define TIM_ARR (uint16_t)1999
34 | #define TIM_CCR (uint16_t)1000
35 |
36 | /* MEMS Microphone SPI Interface */
37 | #define SPI_SCK_PIN GPIO_Pin_10
38 | #define SPI_SCK_GPIO_PORT GPIOB
39 | #define SPI_SCK_GPIO_CLK RCC_AHB1Periph_GPIOB
40 | #define SPI_SCK_SOURCE GPIO_PinSource10
41 | #define SPI_SCK_AF GPIO_AF_SPI2
42 |
43 | #define SPI_MOSI_PIN GPIO_Pin_3
44 | #define SPI_MOSI_GPIO_PORT GPIOC
45 | #define SPI_MOSI_GPIO_CLK RCC_AHB1Periph_GPIOC
46 | #define SPI_MOSI_SOURCE GPIO_PinSource3
47 | #define SPI_MOSI_AF GPIO_AF_SPI2
48 |
49 | /* Exported macro ------------------------------------------------------------*/
50 | #define ABS(x) (x < 0) ? (-x) : x
51 | #define MAX(a,b) (a < b) ? (b) : a
52 | /* Exported functions ------------------------------------------------------- */
53 | void TimingDelay_Decrement(void);
54 | void Delay(__IO uint32_t nTime);
55 | void Fail_Handler(void);
56 | void process_line(uint8_t line_num);
57 | #endif /* __STM32F4_DISCOVERY_DEMO_H */
58 |
59 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
60 |
--------------------------------------------------------------------------------
/iar_adc_test/adc_test/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_it.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4xx_IT_H
24 | #define __STM32F4xx_IT_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 |
32 | /* Exported types ------------------------------------------------------------*/
33 | /* Exported constants --------------------------------------------------------*/
34 | /* Exported macro ------------------------------------------------------------*/
35 | /* Exported functions ------------------------------------------------------- */
36 |
37 | void NMI_Handler(void);
38 | void HardFault_Handler(void);
39 | void MemManage_Handler(void);
40 | void BusFault_Handler(void);
41 | void UsageFault_Handler(void);
42 | void SVC_Handler(void);
43 | void DebugMon_Handler(void);
44 | void PendSV_Handler(void);
45 | void SysTick_Handler(void);
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* __STM32F4xx_IT_H */
52 |
53 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
54 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/CMSIS/Include/arm_common_tables.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 11. November 2010
5 | * $Revision: V1.0.2
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 | * Version 1.0.2 2010/11/11
15 | * Documentation updated.
16 | *
17 | * Version 1.0.1 2010/10/05
18 | * Production release and review comments incorporated.
19 | *
20 | * Version 1.0.0 2010/09/20
21 | * Production release and review comments incorporated.
22 | * -------------------------------------------------------------------- */
23 |
24 | #ifndef _ARM_COMMON_TABLES_H
25 | #define _ARM_COMMON_TABLES_H
26 |
27 | #include "arm_math.h"
28 |
29 | extern uint16_t armBitRevTable[256];
30 | extern q15_t armRecipTableQ15[64];
31 | extern q31_t armRecipTableQ31[64];
32 | extern const q31_t realCoefAQ31[1024];
33 | extern const q31_t realCoefBQ31[1024];
34 |
35 | #endif /* ARM_COMMON_TABLES_H */
36 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/CMSIS/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 30-September-2011
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f4xx_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F4XX_H
34 | #define __SYSTEM_STM32F4XX_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F4xx_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F4xx_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 |
56 | /**
57 | * @}
58 | */
59 |
60 | /** @addtogroup STM32F4xx_System_Exported_Constants
61 | * @{
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 |
68 | /** @addtogroup STM32F4xx_System_Exported_Macros
69 | * @{
70 | */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @addtogroup STM32F4xx_System_Exported_Functions
77 | * @{
78 | */
79 |
80 | extern void SystemInit(void);
81 | extern void SystemCoreClockUpdate(void);
82 | /**
83 | * @}
84 | */
85 |
86 | #ifdef __cplusplus
87 | }
88 | #endif
89 |
90 | #endif /*__SYSTEM_STM32F4XX_H */
91 |
92 | /**
93 | * @}
94 | */
95 |
96 | /**
97 | * @}
98 | */
99 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
100 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.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 CRC firmware
8 | * library.
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 __STM32F4xx_CRC_H
25 | #define __STM32F4xx_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f4xx.h"
33 |
34 | /** @addtogroup STM32F4xx_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /* Exported types ------------------------------------------------------------*/
43 | /* Exported constants --------------------------------------------------------*/
44 |
45 | /** @defgroup CRC_Exported_Constants
46 | * @{
47 | */
48 |
49 | /**
50 | * @}
51 | */
52 |
53 | /* Exported macro ------------------------------------------------------------*/
54 | /* Exported functions --------------------------------------------------------*/
55 |
56 | void CRC_ResetDR(void);
57 | uint32_t CRC_CalcCRC(uint32_t Data);
58 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
59 | uint32_t CRC_GetCRC(void);
60 | void CRC_SetIDRegister(uint8_t IDValue);
61 | uint8_t CRC_GetIDRegister(void);
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif /* __STM32F4xx_CRC_H */
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Class/video/inc/usbd_video_core.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Class/video/inc/usbd_video_core.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Core/inc/usbd_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf_template.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief usb device configuration template file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Core/inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief Header file for usbd_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Core/inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief header file for the usbd_ioreq.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_Device_Library/Core/inc/usbd_req.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief header file for the usbd_req.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.1.0
6 | * @date 19-March-2012
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 "usb_core.h"
34 | #include "usb_conf.h"
35 |
36 | /** @addtogroup USB_OTG_DRIVER
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_BSP
41 | * @brief This file is the
42 | * @{
43 | */
44 |
45 |
46 | /** @defgroup USB_BSP_Exported_Defines
47 | * @{
48 | */
49 | /**
50 | * @}
51 | */
52 |
53 |
54 | /** @defgroup USB_BSP_Exported_Types
55 | * @{
56 | */
57 | /**
58 | * @}
59 | */
60 |
61 |
62 | /** @defgroup USB_BSP_Exported_Macros
63 | * @{
64 | */
65 | /**
66 | * @}
67 | */
68 |
69 | /** @defgroup USB_BSP_Exported_Variables
70 | * @{
71 | */
72 | /**
73 | * @}
74 | */
75 |
76 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
77 | * @{
78 | */
79 | void BSP_Init(void);
80 |
81 | void USB_OTG_BSP_Init (USB_OTG_CORE_HANDLE *pdev);
82 | void USB_OTG_BSP_uDelay (const uint32_t usec);
83 | void USB_OTG_BSP_mDelay (const uint32_t msec);
84 | void USB_OTG_BSP_EnableInterrupt (USB_OTG_CORE_HANDLE *pdev);
85 | #ifdef USE_HOST_MODE
86 | void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev);
87 | void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev,uint8_t state);
88 | #endif
89 | /**
90 | * @}
91 | */
92 |
93 | #endif //__USB_BSP__H__
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
104 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/pdm_filter.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file pdm_filter.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 28-October-2011
7 | * @brief Header file for PDM audio software decoding Library.
8 | * This Library is used to decode and reconstruct the audio signal
9 | * produced by MP45DT02 MEMS microphone from STMicroelectronics.
10 | * For more details about this Library, please refer to document
11 | * "PDM audio software decoding on STM32 microcontrollers (AN3998)".
12 | ******************************************************************************
13 | * @attention
14 | *
15 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
16 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
17 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
18 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
19 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
20 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
21 | *
22 | * © COPYRIGHT 2011 STMicroelectronics
23 | ******************************************************************************
24 | */
25 |
26 | /* Define to prevent recursive inclusion -------------------------------------*/
27 | #ifndef __PDM_FILTER_H
28 | #define __PDM_FILTER_H
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | /* Includes ------------------------------------------------------------------*/
35 | #include
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 | typedef struct {
39 | uint16_t Fs;
40 | float LP_HZ;
41 | float HP_HZ;
42 | uint16_t In_MicChannels;
43 | uint16_t Out_MicChannels;
44 | char InternalFilter[34];
45 | } PDMFilter_InitStruct;
46 |
47 | /* Exported constants --------------------------------------------------------*/
48 | /* Exported macros -----------------------------------------------------------*/
49 | #define HTONS(A) ((((u16)(A) & 0xff00) >> 8) | \
50 | (((u16)(A) & 0x00ff) << 8))
51 |
52 | /* Exported functions ------------------------------------------------------- */
53 | void PDM_Filter_Init(PDMFilter_InitStruct * Filter);
54 |
55 | int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
56 | int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
57 | int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
58 | int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /* __PDM_FILTER_H */
65 |
66 | /*******************(C)COPYRIGHT 2011 STMicroelectronics *****END OF FILE******/
67 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/Demo/Obj/STM32F4-Discovery.pbd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/EWARM/Demo/Obj/STM32F4-Discovery.pbd
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/Demo/Obj/STM32F4-Discovery.pbd.browse:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/EWARM/Demo/Obj/STM32F4-Discovery.pbd.browse
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/STM32F4-Discovery.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\STM32F4-Discovery.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.Demo.driver.xcl:
--------------------------------------------------------------------------------
1 | "--endian=little"
2 |
3 | "--cpu=Cortex-M4"
4 |
5 | "--fpu=VFPv4_SP"
6 |
7 | "-p"
8 |
9 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\CONFIG\debugger\ST\STM32F407VG.ddf"
10 |
11 | "--drv_verify_download"
12 |
13 | "--semihosting"
14 |
15 | "--device=STM32F407VG"
16 |
17 | "--drv_interface=SWD"
18 |
19 | "--stlink_reset_strategy=0,0"
20 |
21 | "--drv_swo_clock_setup=2000000,0,2000000"
22 |
23 | "--drv_catch_exceptions=0x000"
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.Demo.general.xcl:
--------------------------------------------------------------------------------
1 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armproc.dll"
2 |
3 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armstlink2.dll"
4 |
5 | "D:\GITHUB\UVC_Camera\iar_uvc_mjpeg\iar_uvc_camera\EWARM\Demo\Exe\STM32F4-Discovery_Demo.out"
6 |
7 | --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armbat.dll"
8 |
9 | --device_macro "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\ST\STM32F4xx.dmac"
10 |
11 | --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32F4xxx.board"
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.crun:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 |
6 |
7 | *
8 | *
9 | *
10 | 0
11 | 1
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.dbgdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.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 | [Disassemble mode]
12 | mode=0
13 | [Breakpoints2]
14 | Count=0
15 | [Aliases]
16 | Count=0
17 | SuppressDialog=0
18 | [StLinkDriver]
19 | CStepIntDis=_ 0
20 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/settings/STM32F4-Discovery.wspos:
--------------------------------------------------------------------------------
1 | [MainWindow]
2 | WindowPlacement=_ 0 0 1536 824 3
3 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/EWARM/stm32f40x_flash.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__ = 0x080FFFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20020000;
11 | define symbol __ICFEDIT_region_RAMCCM_start__ = 0x10000000;
12 | define symbol __ICFEDIT_region_RAMCCM_end__ = 0x1000FFFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x800;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
22 | define region CCMRAM_region = mem:[from __ICFEDIT_region_RAMCCM_start__ to __ICFEDIT_region_RAMCCM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
35 | place in CCMRAM_region {section .ccmram};
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/adc_control.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/adc_control.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/adc_control.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef __ADC_CONTROL_H
4 | #define __ADC_CONTROL_H
5 |
6 | #define LINE_BUFFER_SIZE (uint16_t)183 //183*2 samples
7 | #define LINE_PIX_LENGTH (uint16_t)(LINE_BUFFER_SIZE*2) //183*2 samples
8 | #define LINES_NUMBER 240
9 |
10 | #define LOW_ADC_THRESHOLD 40//óðîâåíü ñèíõðîíèçàöèè (ìèíèìàëüíûé ñèãíàë)
11 | #define HIGH_ADC_THRESHOLD 45
12 |
13 |
14 | void init_clk(void);
15 | void adc_init(void);
16 | void init_tim2(void);
17 | void init_adc3(void);
18 |
19 | void stop_capture(void);
20 | void start_capture(void);
21 |
22 | void capture_dma_start(void);
23 |
24 |
25 |
26 | #endif
27 |
28 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/bitbanding.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/bitbanding.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/jprocess.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/jprocess.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/jprocess.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __JPROCESS_H
3 | #define __JPROCESS_H
4 |
5 | unsigned int jprocess(void);
6 | void switch_buffers(void);
7 | #endif
8 |
9 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/main.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg/iar_uvc_camera/main.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/main.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file main.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief Header for main.c module
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4_DISCOVERY_DEMO_H
24 | #define __STM32F4_DISCOVERY_DEMO_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 | #include
29 |
30 | /* Exported types ------------------------------------------------------------*/
31 | /* Exported constants --------------------------------------------------------*/
32 | /* TIM2 Autoreload and Capture Compare register values */
33 | #define TIM_ARR (uint16_t)1999
34 | #define TIM_CCR (uint16_t)1000
35 |
36 | /* MEMS Microphone SPI Interface */
37 | #define SPI_SCK_PIN GPIO_Pin_10
38 | #define SPI_SCK_GPIO_PORT GPIOB
39 | #define SPI_SCK_GPIO_CLK RCC_AHB1Periph_GPIOB
40 | #define SPI_SCK_SOURCE GPIO_PinSource10
41 | #define SPI_SCK_AF GPIO_AF_SPI2
42 |
43 | #define SPI_MOSI_PIN GPIO_Pin_3
44 | #define SPI_MOSI_GPIO_PORT GPIOC
45 | #define SPI_MOSI_GPIO_CLK RCC_AHB1Periph_GPIOC
46 | #define SPI_MOSI_SOURCE GPIO_PinSource3
47 | #define SPI_MOSI_AF GPIO_AF_SPI2
48 |
49 | /* Exported macro ------------------------------------------------------------*/
50 | #define ABS(x) (x < 0) ? (-x) : x
51 | #define MAX(a,b) (a < b) ? (b) : a
52 | /* Exported functions ------------------------------------------------------- */
53 | void Delay_ms(uint32_t ms);
54 | void process_line(uint8_t line_num);
55 | void Fail_Handler(void);
56 | #endif /* __STM32F4_DISCOVERY_DEMO_H */
57 |
58 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
59 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/params.h:
--------------------------------------------------------------------------------
1 | /* Name: params.h
2 | * Project: ARM fast JPEG-coder
3 | * Author: Dmitry Oparin aka Rst7/CBSIE
4 | * Creation Date: 1-Jun-2008
5 | * Copyright: (C)2008 by Rst7/CBSIE
6 | * License: GNU GPL v3 (see http://www.gnu.org/licenses/gpl-3.0.txt)
7 | */
8 |
9 | #ifndef PARAMS_H
10 | #define PARAMS_H
11 |
12 | #define IMG_WIDTH (320)
13 | #define IMG_HEIGHT (240)
14 |
15 | typedef int DCTELEM;
16 |
17 | #define DCTSIZE (8)
18 |
19 | #define BLOCKSIZE ((DCTSIZE)*(DCTSIZE))
20 |
21 | #endif
22 |
23 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/stdafx.h:
--------------------------------------------------------------------------------
1 | /* Name: stdafx.h
2 | * Project: ARM fast JPEG-coder
3 | * Author: Dmitry Oparin aka Rst7/CBSIE
4 | * Creation Date: 1-Jun-2008
5 | * Copyright: (C)2008 by Rst7/CBSIE
6 | * License: GNU GPL v3 (see http://www.gnu.org/licenses/gpl-3.0.txt)
7 | */
8 |
9 | #ifndef STDAFX_H
10 | #define STDAFX_H
11 |
12 |
13 | #define __flash const
14 | #define __x
15 | #define __z
16 | #define __x_z
17 | #define __z_x
18 |
19 |
20 | //#include /* compiler extra options must be added "--string_literals_in_flash" */
21 |
22 | /*****************************************************************************
23 | Types definitions
24 | ******************************************************************************/
25 |
26 | typedef unsigned int UREG;
27 | typedef signed int REG;
28 |
29 | /* byte */
30 | typedef char CHAR;
31 | typedef signed char SCHAR;
32 | typedef unsigned char UCHAR;
33 | typedef SCHAR INT8;
34 | typedef UCHAR UINT8;
35 | typedef SCHAR SINT8;
36 | #define MAXUINT8 ((UINT8)(-1))
37 |
38 | /* word */
39 | typedef short INT16;
40 | typedef signed short SINT16;
41 | typedef unsigned short UINT16;
42 | #define MAXUINT16 ((UINT16)(-1))
43 |
44 | /* long word */
45 | typedef long INT32;
46 | typedef signed long SINT32;
47 | typedef unsigned long UINT32;
48 | #define MAXUINT32 ((UINT32)(-1))
49 |
50 | /* utils */
51 | /*#define MAKEUINT16(byte_h, byte_l) ((UINT16)(((UINT16)(byte_h) << 8)|(UINT16)(byte_l)))
52 | #define HIBYTE(word) ((UCHAR)((UINT16)(word) >> 8))
53 | #define LOBYTE(word) ((UCHAR)((UINT16)(word) & 0xff))
54 |
55 | #define MAKEUINT32(word_h, word_l) ((UINT32)(((UINT32)(word_h) << 16)|(UINT32)(word_l)))
56 | #define HIWORD(longv) ((UINT16)((UINT32)(longv) >> 16))
57 | #define LOWORD(longv) ((UINT16)((UINT32)(longv) & 0xffff))*/
58 |
59 | #define SWAP16(n16) ((((UINT16)(n16))<<8)|(((UINT16)(n16))>>8))
60 | /*#define SWAP32(n32) (MAKEUINT32(SWAP16(LOWORD(n32)), SWAP16(HIWORD(n32))))*/
61 |
62 | #endif//STDAFX_H
63 |
64 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_it.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4xx_IT_H
24 | #define __STM32F4xx_IT_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "usb_conf.h"
32 |
33 | /* Exported types ------------------------------------------------------------*/
34 | /* Exported constants --------------------------------------------------------*/
35 | /* Exported macro ------------------------------------------------------------*/
36 | /* Exported functions ------------------------------------------------------- */
37 |
38 | void NMI_Handler(void);
39 | void HardFault_Handler(void);
40 | void MemManage_Handler(void);
41 | void BusFault_Handler(void);
42 | void UsageFault_Handler(void);
43 | void SVC_Handler(void);
44 | void DebugMon_Handler(void);
45 | void PendSV_Handler(void);
46 | void SysTick_Handler(void);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 | #endif /* __STM32F4xx_IT_H */
53 |
54 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
55 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg/iar_uvc_camera/usbd_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief USB Device configuration file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CONF__H__
24 | #define __USBD_CONF__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 |
29 | #define USBD_CFG_MAX_NUM 1
30 | #define USBD_ITF_MAX_NUM 1
31 | #define USB_MAX_STR_DESC_SIZ 200
32 |
33 |
34 |
35 |
36 | #endif //__USBD_CONF__H__
37 |
38 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/CMSIS/Include/arm_common_tables.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 11. November 2010
5 | * $Revision: V1.0.2
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 | * Version 1.0.2 2010/11/11
15 | * Documentation updated.
16 | *
17 | * Version 1.0.1 2010/10/05
18 | * Production release and review comments incorporated.
19 | *
20 | * Version 1.0.0 2010/09/20
21 | * Production release and review comments incorporated.
22 | * -------------------------------------------------------------------- */
23 |
24 | #ifndef _ARM_COMMON_TABLES_H
25 | #define _ARM_COMMON_TABLES_H
26 |
27 | #include "arm_math.h"
28 |
29 | extern uint16_t armBitRevTable[256];
30 | extern q15_t armRecipTableQ15[64];
31 | extern q31_t armRecipTableQ31[64];
32 | extern const q31_t realCoefAQ31[1024];
33 | extern const q31_t realCoefBQ31[1024];
34 |
35 | #endif /* ARM_COMMON_TABLES_H */
36 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/CMSIS/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 30-September-2011
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f4xx_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F4XX_H
34 | #define __SYSTEM_STM32F4XX_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F4xx_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F4xx_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 |
56 | /**
57 | * @}
58 | */
59 |
60 | /** @addtogroup STM32F4xx_System_Exported_Constants
61 | * @{
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 |
68 | /** @addtogroup STM32F4xx_System_Exported_Macros
69 | * @{
70 | */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @addtogroup STM32F4xx_System_Exported_Functions
77 | * @{
78 | */
79 |
80 | extern void SystemInit(void);
81 | extern void SystemCoreClockUpdate(void);
82 | /**
83 | * @}
84 | */
85 |
86 | #ifdef __cplusplus
87 | }
88 | #endif
89 |
90 | #endif /*__SYSTEM_STM32F4XX_H */
91 |
92 | /**
93 | * @}
94 | */
95 |
96 | /**
97 | * @}
98 | */
99 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
100 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.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 CRC firmware
8 | * library.
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 __STM32F4xx_CRC_H
25 | #define __STM32F4xx_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f4xx.h"
33 |
34 | /** @addtogroup STM32F4xx_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /* Exported types ------------------------------------------------------------*/
43 | /* Exported constants --------------------------------------------------------*/
44 |
45 | /** @defgroup CRC_Exported_Constants
46 | * @{
47 | */
48 |
49 | /**
50 | * @}
51 | */
52 |
53 | /* Exported macro ------------------------------------------------------------*/
54 | /* Exported functions --------------------------------------------------------*/
55 |
56 | void CRC_ResetDR(void);
57 | uint32_t CRC_CalcCRC(uint32_t Data);
58 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
59 | uint32_t CRC_GetCRC(void);
60 | void CRC_SetIDRegister(uint8_t IDValue);
61 | uint8_t CRC_GetIDRegister(void);
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif /* __STM32F4xx_CRC_H */
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Class/video/inc/usbd_video_core.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Class/video/inc/usbd_video_core.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Class/video/src/usbd_video_core.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Class/video/src/usbd_video_core.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Core/inc/usbd_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf_template.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief usb device configuration template file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Core/inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief Header file for usbd_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_Device_Library/Core/inc/usbd_req.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief header file for the usbd_req.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.1.0
6 | * @date 19-March-2012
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 "usb_core.h"
34 | #include "usb_conf.h"
35 |
36 | /** @addtogroup USB_OTG_DRIVER
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_BSP
41 | * @brief This file is the
42 | * @{
43 | */
44 |
45 |
46 | /** @defgroup USB_BSP_Exported_Defines
47 | * @{
48 | */
49 | /**
50 | * @}
51 | */
52 |
53 |
54 | /** @defgroup USB_BSP_Exported_Types
55 | * @{
56 | */
57 | /**
58 | * @}
59 | */
60 |
61 |
62 | /** @defgroup USB_BSP_Exported_Macros
63 | * @{
64 | */
65 | /**
66 | * @}
67 | */
68 |
69 | /** @defgroup USB_BSP_Exported_Variables
70 | * @{
71 | */
72 | /**
73 | * @}
74 | */
75 |
76 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
77 | * @{
78 | */
79 | void BSP_Init(void);
80 |
81 | void USB_OTG_BSP_Init (USB_OTG_CORE_HANDLE *pdev);
82 | void USB_OTG_BSP_uDelay (const uint32_t usec);
83 | void USB_OTG_BSP_mDelay (const uint32_t msec);
84 | void USB_OTG_BSP_EnableInterrupt (USB_OTG_CORE_HANDLE *pdev);
85 | #ifdef USE_HOST_MODE
86 | void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev);
87 | void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev,uint8_t state);
88 | #endif
89 | /**
90 | * @}
91 | */
92 |
93 | #endif //__USB_BSP__H__
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
104 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/pdm_filter.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file pdm_filter.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 28-October-2011
7 | * @brief Header file for PDM audio software decoding Library.
8 | * This Library is used to decode and reconstruct the audio signal
9 | * produced by MP45DT02 MEMS microphone from STMicroelectronics.
10 | * For more details about this Library, please refer to document
11 | * "PDM audio software decoding on STM32 microcontrollers (AN3998)".
12 | ******************************************************************************
13 | * @attention
14 | *
15 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
16 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
17 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
18 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
19 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
20 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
21 | *
22 | * © COPYRIGHT 2011 STMicroelectronics
23 | ******************************************************************************
24 | */
25 |
26 | /* Define to prevent recursive inclusion -------------------------------------*/
27 | #ifndef __PDM_FILTER_H
28 | #define __PDM_FILTER_H
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | /* Includes ------------------------------------------------------------------*/
35 | #include
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 | typedef struct {
39 | uint16_t Fs;
40 | float LP_HZ;
41 | float HP_HZ;
42 | uint16_t In_MicChannels;
43 | uint16_t Out_MicChannels;
44 | char InternalFilter[34];
45 | } PDMFilter_InitStruct;
46 |
47 | /* Exported constants --------------------------------------------------------*/
48 | /* Exported macros -----------------------------------------------------------*/
49 | #define HTONS(A) ((((u16)(A) & 0xff00) >> 8) | \
50 | (((u16)(A) & 0x00ff) << 8))
51 |
52 | /* Exported functions ------------------------------------------------------- */
53 | void PDM_Filter_Init(PDMFilter_InitStruct * Filter);
54 |
55 | int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
56 | int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
57 | int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
58 | int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /* __PDM_FILTER_H */
65 |
66 | /*******************(C)COPYRIGHT 2011 STMicroelectronics *****END OF FILE******/
67 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Exe/STM32F4-Discovery_Demo.sim:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Exe/STM32F4-Discovery_Demo.sim
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Obj/STM32F4-Discovery.pbd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Obj/STM32F4-Discovery.pbd
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Obj/STM32F4-Discovery.pbd.browse:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/Demo/Obj/STM32F4-Discovery.pbd.browse
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/STM32F4-Discovery.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\STM32F4-Discovery.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/settings/STM32F4-Discovery.Demo.driver.xcl:
--------------------------------------------------------------------------------
1 | "--endian=little"
2 |
3 | "--cpu=Cortex-M4"
4 |
5 | "--fpu=VFPv4_SP"
6 |
7 | "-p"
8 |
9 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\CONFIG\debugger\ST\STM32F407VG.ddf"
10 |
11 | "--drv_verify_download"
12 |
13 | "--semihosting"
14 |
15 | "--device=STM32F407VG"
16 |
17 | "--drv_interface=SWD"
18 |
19 | "--stlink_reset_strategy=0,0"
20 |
21 | "--drv_swo_clock_setup=2000000,0,2000000"
22 |
23 | "--drv_catch_exceptions=0x000"
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/settings/STM32F4-Discovery.Demo.general.xcl:
--------------------------------------------------------------------------------
1 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armproc.dll"
2 |
3 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armstlink2.dll"
4 |
5 | "D:\GITHUB\UVC_Camera\iar_uvc_mjpeg_static\iar_uvc_mjpeg\EWARM\Demo\Exe\STM32F4-Discovery_Demo.out"
6 |
7 | --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\bin\armbat.dll"
8 |
9 | --device_macro "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\debugger\ST\STM32F4xx.dmac"
10 |
11 | --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.3\arm\config\flashloader\ST\FlashSTM32F4xxx.board"
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/settings/STM32F4-Discovery.crun:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 |
6 |
7 | *
8 | *
9 | *
10 | 0
11 | 1
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/settings/STM32F4-Discovery.dni:
--------------------------------------------------------------------------------
1 | [StLinkDriver]
2 | stlinkserialNo=C0CCD28D
3 | stlinkfoundProbes=
4 | CStepIntDis=_ 0
5 | [DebugChecksum]
6 | Checksum=-1290427412
7 | [Exceptions]
8 | StopOnUncaught=_ 0
9 | StopOnThrow=_ 0
10 | [CodeCoverage]
11 | Enabled=_ 0
12 | [Stack]
13 | FillEnabled=0
14 | OverflowWarningsEnabled=1
15 | WarningThreshold=90
16 | SpWarningsEnabled=1
17 | WarnLogOnly=1
18 | UseTrigger=1
19 | TriggerName=main
20 | LimitSize=0
21 | ByteLimit=50
22 | [CallStack]
23 | ShowArgs=0
24 | [Disassembly]
25 | MixedMode=1
26 | [SWOTraceHWSettings]
27 | OverrideDefaultClocks=0
28 | CpuClock=2000000
29 | ClockAutoDetect=0
30 | ClockWanted=2000000
31 | JtagSpeed=2000000
32 | Prescaler=1
33 | TimeStampPrescIndex=0
34 | TimeStampPrescData=0
35 | PcSampCYCTAP=1
36 | PcSampPOSTCNT=15
37 | PcSampIndex=0
38 | DataLogMode=0
39 | ITMportsEnable=0
40 | ITMportsTermIO=0
41 | ITMportsLogFile=0
42 | ITMlogFile=$PROJ_DIR$\ITM.log
43 | [Trace2]
44 | Enabled=0
45 | ShowSource=0
46 | [SWOTraceWindow]
47 | PcSampling=0
48 | InterruptLogs=0
49 | ForcedTimeStamps=0
50 | EventCPI=0
51 | EventEXC=0
52 | EventFOLD=0
53 | EventLSU=0
54 | EventSLEEP=0
55 | [DataLog]
56 | LogEnabled=0
57 | GraphEnabled=0
58 | ShowTimeLog=1
59 | SumEnabled=0
60 | ShowTimeSum=1
61 | [EventLog]
62 | Title_0=Ch3
63 | Symbol_0=0 4 1
64 | Title_1=Ch2
65 | Symbol_1=0 4 1
66 | Title_2=Ch1
67 | Symbol_2=0 4 1
68 | Title_3=Ch0
69 | Symbol_3=0 4 1
70 | LogEnabled=0
71 | GraphEnabled=0
72 | ShowTimeLog=1
73 | SumEnabled=0
74 | ShowTimeSum=1
75 | SumSortOrder=0
76 | [InterruptLog]
77 | LogEnabled=0
78 | GraphEnabled=0
79 | ShowTimeLog=1
80 | SumEnabled=0
81 | ShowTimeSum=1
82 | SumSortOrder=0
83 | [Log file]
84 | LoggingEnabled=_ 0
85 | LogFile=_ ""
86 | Category=_ 0
87 | [TermIOLog]
88 | LoggingEnabled=_ 0
89 | LogFile=_ ""
90 | [DriverProfiling]
91 | Enabled=0
92 | Mode=3
93 | Graph=0
94 | Symbiont=0
95 | Exclusions=
96 | [CallStackLog]
97 | Enabled=0
98 | [CallStackStripe]
99 | ShowTiming=1
100 | [Disassemble mode]
101 | mode=0
102 | [Breakpoints2]
103 | Count=0
104 | [Aliases]
105 | Count=0
106 | SuppressDialog=0
107 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/settings/STM32F4-Discovery.wspos:
--------------------------------------------------------------------------------
1 | [MainWindow]
2 | WindowPlacement=_ 0 0 1536 824 3
3 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/EWARM/stm32f40x_flash.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__ = 0x080FFFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20020000;
11 | define symbol __ICFEDIT_region_RAMCCM_start__ = 0x10000000;
12 | define symbol __ICFEDIT_region_RAMCCM_end__ = 0x1000FFFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x400;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
21 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
22 | define region CCMRAM_region = mem:[from __ICFEDIT_region_RAMCCM_start__ to __ICFEDIT_region_RAMCCM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
35 | place in CCMRAM_region {section .ccmram};
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/bmp2.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/iar_uvc_mjpeg/bmp2.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/componentfile.history:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/gray_jpg_test3.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_mjpeg_static/iar_uvc_mjpeg/gray_jpg_test3.h
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/jprocess.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __JPROCESS_H
3 | #define __JPROCESS_H
4 |
5 | #include "params.h"
6 |
7 | unsigned int jprocess(void);
8 | void switch_buffers(void);
9 | #endif
10 |
11 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/main.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file main.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief Header for main.c module
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4_DISCOVERY_DEMO_H
24 | #define __STM32F4_DISCOVERY_DEMO_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 | #include
29 |
30 | /* Exported types ------------------------------------------------------------*/
31 | /* Exported constants --------------------------------------------------------*/
32 | /* TIM2 Autoreload and Capture Compare register values */
33 | #define TIM_ARR (uint16_t)1999
34 | #define TIM_CCR (uint16_t)1000
35 |
36 | /* MEMS Microphone SPI Interface */
37 | #define SPI_SCK_PIN GPIO_Pin_10
38 | #define SPI_SCK_GPIO_PORT GPIOB
39 | #define SPI_SCK_GPIO_CLK RCC_AHB1Periph_GPIOB
40 | #define SPI_SCK_SOURCE GPIO_PinSource10
41 | #define SPI_SCK_AF GPIO_AF_SPI2
42 |
43 | #define SPI_MOSI_PIN GPIO_Pin_3
44 | #define SPI_MOSI_GPIO_PORT GPIOC
45 | #define SPI_MOSI_GPIO_CLK RCC_AHB1Periph_GPIOC
46 | #define SPI_MOSI_SOURCE GPIO_PinSource3
47 | #define SPI_MOSI_AF GPIO_AF_SPI2
48 |
49 | /* Exported macro ------------------------------------------------------------*/
50 | #define ABS(x) (x < 0) ? (-x) : x
51 | #define MAX(a,b) (a < b) ? (b) : a
52 | /* Exported functions ------------------------------------------------------- */
53 | void draw_circle(int Hcenter, int Vcenter, int radius,uint8_t color);
54 | void TimingDelay_Decrement(void);
55 | void Delay(__IO uint32_t nTime);
56 | void Fail_Handler(void);
57 | #endif /* __STM32F4_DISCOVERY_DEMO_H */
58 |
59 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
60 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/params.h:
--------------------------------------------------------------------------------
1 | /* Name: params.h
2 | * Project: ARM fast JPEG-coder
3 | * Author: Dmitry Oparin aka Rst7/CBSIE
4 | * Creation Date: 1-Jun-2008
5 | * Copyright: (C)2008 by Rst7/CBSIE
6 | * License: GNU GPL v3 (see http://www.gnu.org/licenses/gpl-3.0.txt)
7 | */
8 |
9 | #ifndef PARAMS_H
10 | #define PARAMS_H
11 |
12 | #define IMG_WIDTH (320)
13 | #define IMG_HEIGHT (240)
14 |
15 | typedef int DCTELEM;
16 |
17 | #define DCTSIZE (8)
18 |
19 | #define BLOCKSIZE ((DCTSIZE)*(DCTSIZE))
20 |
21 | #endif
22 |
23 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/stdafx.h:
--------------------------------------------------------------------------------
1 | /* Name: stdafx.h
2 | * Project: ARM fast JPEG-coder
3 | * Author: Dmitry Oparin aka Rst7/CBSIE
4 | * Creation Date: 1-Jun-2008
5 | * Copyright: (C)2008 by Rst7/CBSIE
6 | * License: GNU GPL v3 (see http://www.gnu.org/licenses/gpl-3.0.txt)
7 | */
8 |
9 | #ifndef STDAFX_H
10 | #define STDAFX_H
11 |
12 |
13 | #define __flash const
14 | #define __x
15 | #define __z
16 | #define __x_z
17 | #define __z_x
18 |
19 |
20 | //#include /* compiler extra options must be added "--string_literals_in_flash" */
21 |
22 | /*****************************************************************************
23 | Types definitions
24 | ******************************************************************************/
25 |
26 | typedef unsigned int UREG;
27 | typedef signed int REG;
28 |
29 | /* byte */
30 | typedef char CHAR;
31 | typedef signed char SCHAR;
32 | typedef unsigned char UCHAR;
33 | typedef SCHAR INT8;
34 | typedef UCHAR UINT8;
35 | typedef SCHAR SINT8;
36 | #define MAXUINT8 ((UINT8)(-1))
37 |
38 | /* word */
39 | typedef short INT16;
40 | typedef signed short SINT16;
41 | typedef unsigned short UINT16;
42 | #define MAXUINT16 ((UINT16)(-1))
43 |
44 | /* long word */
45 | typedef long INT32;
46 | typedef signed long SINT32;
47 | typedef unsigned long UINT32;
48 | #define MAXUINT32 ((UINT32)(-1))
49 |
50 | /* utils */
51 | /*#define MAKEUINT16(byte_h, byte_l) ((UINT16)(((UINT16)(byte_h) << 8)|(UINT16)(byte_l)))
52 | #define HIBYTE(word) ((UCHAR)((UINT16)(word) >> 8))
53 | #define LOBYTE(word) ((UCHAR)((UINT16)(word) & 0xff))
54 |
55 | #define MAKEUINT32(word_h, word_l) ((UINT32)(((UINT32)(word_h) << 16)|(UINT32)(word_l)))
56 | #define HIWORD(longv) ((UINT16)((UINT32)(longv) >> 16))
57 | #define LOWORD(longv) ((UINT16)((UINT32)(longv) & 0xffff))*/
58 |
59 | #define SWAP16(n16) ((((UINT16)(n16))<<8)|(((UINT16)(n16))>>8))
60 | /*#define SWAP32(n32) (MAKEUINT32(SWAP16(LOWORD(n32)), SWAP16(HIWORD(n32))))*/
61 |
62 | #endif//STDAFX_H
63 |
64 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_it.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4xx_IT_H
24 | #define __STM32F4xx_IT_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "usb_conf.h"
32 |
33 | /* Exported types ------------------------------------------------------------*/
34 | /* Exported constants --------------------------------------------------------*/
35 | /* Exported macro ------------------------------------------------------------*/
36 | /* Exported functions ------------------------------------------------------- */
37 |
38 | void NMI_Handler(void);
39 | void HardFault_Handler(void);
40 | void MemManage_Handler(void);
41 | void BusFault_Handler(void);
42 | void UsageFault_Handler(void);
43 | void SVC_Handler(void);
44 | void DebugMon_Handler(void);
45 | void PendSV_Handler(void);
46 | void SysTick_Handler(void);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 | #endif /* __STM32F4xx_IT_H */
53 |
54 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
55 |
--------------------------------------------------------------------------------
/iar_uvc_mjpeg_static/iar_uvc_mjpeg/usbd_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief USB Device configuration file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CONF__H__
24 | #define __USBD_CONF__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 |
29 | #define USBD_CFG_MAX_NUM 1
30 | #define USBD_ITF_MAX_NUM 1
31 | #define USB_MAX_STR_DESC_SIZ 200
32 |
33 |
34 |
35 |
36 | #endif //__USBD_CONF__H__
37 |
38 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/CMSIS/Include/arm_common_tables.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 11. November 2010
5 | * $Revision: V1.0.2
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 | * Version 1.0.2 2010/11/11
15 | * Documentation updated.
16 | *
17 | * Version 1.0.1 2010/10/05
18 | * Production release and review comments incorporated.
19 | *
20 | * Version 1.0.0 2010/09/20
21 | * Production release and review comments incorporated.
22 | * -------------------------------------------------------------------- */
23 |
24 | #ifndef _ARM_COMMON_TABLES_H
25 | #define _ARM_COMMON_TABLES_H
26 |
27 | #include "arm_math.h"
28 |
29 | extern uint16_t armBitRevTable[256];
30 | extern q15_t armRecipTableQ15[64];
31 | extern q31_t armRecipTableQ31[64];
32 | extern const q31_t realCoefAQ31[1024];
33 | extern const q31_t realCoefBQ31[1024];
34 |
35 | #endif /* ARM_COMMON_TABLES_H */
36 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Libraries/CMSIS/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/CMSIS/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 30-September-2011
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f4xx_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F4XX_H
34 | #define __SYSTEM_STM32F4XX_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F4xx_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F4xx_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 |
56 | /**
57 | * @}
58 | */
59 |
60 | /** @addtogroup STM32F4xx_System_Exported_Constants
61 | * @{
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 |
68 | /** @addtogroup STM32F4xx_System_Exported_Macros
69 | * @{
70 | */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @addtogroup STM32F4xx_System_Exported_Functions
77 | * @{
78 | */
79 |
80 | extern void SystemInit(void);
81 | extern void SystemCoreClockUpdate(void);
82 | /**
83 | * @}
84 | */
85 |
86 | #ifdef __cplusplus
87 | }
88 | #endif
89 |
90 | #endif /*__SYSTEM_STM32F4XX_H */
91 |
92 | /**
93 | * @}
94 | */
95 |
96 | /**
97 | * @}
98 | */
99 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
100 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.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 CRC firmware
8 | * library.
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 __STM32F4xx_CRC_H
25 | #define __STM32F4xx_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f4xx.h"
33 |
34 | /** @addtogroup STM32F4xx_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /* Exported types ------------------------------------------------------------*/
43 | /* Exported constants --------------------------------------------------------*/
44 |
45 | /** @defgroup CRC_Exported_Constants
46 | * @{
47 | */
48 |
49 | /**
50 | * @}
51 | */
52 |
53 | /* Exported macro ------------------------------------------------------------*/
54 | /* Exported functions --------------------------------------------------------*/
55 |
56 | void CRC_ResetDR(void);
57 | uint32_t CRC_CalcCRC(uint32_t Data);
58 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
59 | uint32_t CRC_GetCRC(void);
60 | void CRC_SetIDRegister(uint8_t IDValue);
61 | uint8_t CRC_GetIDRegister(void);
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif /* __STM32F4xx_CRC_H */
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32_USB_Device_Library/Core/inc/usbd_conf_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf_template.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief usb device configuration template file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32_USB_Device_Library/Core/inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief Header file for usbd_core.c
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32_USB_Device_Library/Core/inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief header file for the usbd_ioreq.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32_USB_Device_Library/Core/inc/usbd_req.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 19-March-2012
7 | * @brief header file for the usbd_req.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.1.0
6 | * @date 19-March-2012
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 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 "usb_core.h"
34 | #include "usb_conf.h"
35 |
36 | /** @addtogroup USB_OTG_DRIVER
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_BSP
41 | * @brief This file is the
42 | * @{
43 | */
44 |
45 |
46 | /** @defgroup USB_BSP_Exported_Defines
47 | * @{
48 | */
49 | /**
50 | * @}
51 | */
52 |
53 |
54 | /** @defgroup USB_BSP_Exported_Types
55 | * @{
56 | */
57 | /**
58 | * @}
59 | */
60 |
61 |
62 | /** @defgroup USB_BSP_Exported_Macros
63 | * @{
64 | */
65 | /**
66 | * @}
67 | */
68 |
69 | /** @defgroup USB_BSP_Exported_Variables
70 | * @{
71 | */
72 | /**
73 | * @}
74 | */
75 |
76 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
77 | * @{
78 | */
79 | void BSP_Init(void);
80 |
81 | void USB_OTG_BSP_Init (USB_OTG_CORE_HANDLE *pdev);
82 | void USB_OTG_BSP_uDelay (const uint32_t usec);
83 | void USB_OTG_BSP_mDelay (const uint32_t msec);
84 | void USB_OTG_BSP_EnableInterrupt (USB_OTG_CORE_HANDLE *pdev);
85 | #ifdef USE_HOST_MODE
86 | void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev);
87 | void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev,uint8_t state);
88 | #endif
89 | /**
90 | * @}
91 | */
92 |
93 | #endif //__USB_BSP__H__
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
104 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a
--------------------------------------------------------------------------------
/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_IAR.a
--------------------------------------------------------------------------------
/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Utilities/STM32F4-Discovery/libPDMFilter_Keil.lib
--------------------------------------------------------------------------------
/iar_uvc_nv12/Utilities/STM32F4-Discovery/pdm_filter.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file pdm_filter.h
4 | * @author MCD Application Team
5 | * @version V1.1.0
6 | * @date 28-October-2011
7 | * @brief Header file for PDM audio software decoding Library.
8 | * This Library is used to decode and reconstruct the audio signal
9 | * produced by MP45DT02 MEMS microphone from STMicroelectronics.
10 | * For more details about this Library, please refer to document
11 | * "PDM audio software decoding on STM32 microcontrollers (AN3998)".
12 | ******************************************************************************
13 | * @attention
14 | *
15 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
16 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
17 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
18 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
19 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
20 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
21 | *
22 | * © COPYRIGHT 2011 STMicroelectronics
23 | ******************************************************************************
24 | */
25 |
26 | /* Define to prevent recursive inclusion -------------------------------------*/
27 | #ifndef __PDM_FILTER_H
28 | #define __PDM_FILTER_H
29 |
30 | #ifdef __cplusplus
31 | extern "C" {
32 | #endif
33 |
34 | /* Includes ------------------------------------------------------------------*/
35 | #include
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 | typedef struct {
39 | uint16_t Fs;
40 | float LP_HZ;
41 | float HP_HZ;
42 | uint16_t In_MicChannels;
43 | uint16_t Out_MicChannels;
44 | char InternalFilter[34];
45 | } PDMFilter_InitStruct;
46 |
47 | /* Exported constants --------------------------------------------------------*/
48 | /* Exported macros -----------------------------------------------------------*/
49 | #define HTONS(A) ((((u16)(A) & 0xff00) >> 8) | \
50 | (((u16)(A) & 0x00ff) << 8))
51 |
52 | /* Exported functions ------------------------------------------------------- */
53 | void PDM_Filter_Init(PDMFilter_InitStruct * Filter);
54 |
55 | int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
56 | int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
57 | int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
58 | int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /* __PDM_FILTER_H */
65 |
66 | /*******************(C)COPYRIGHT 2011 STMicroelectronics *****END OF FILE******/
67 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iliasam/STM32F4_UVC_Camera/c0db06502a82b2300016ec6a3e65bcda769ae0d8/iar_uvc_nv12/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/EWARM/STM32F4-Discovery.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\STM32F4-Discovery.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/EWARM/stm32f40x_flash.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__ = 0x080FFFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20020000;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/main.c:
--------------------------------------------------------------------------------
1 |
2 | /* Includes ------------------------------------------------------------------*/
3 | #include "main.h"
4 | //Send static NV12 image to PC by UVC
5 | //By ILIASAM
6 |
7 | #include "usbd_usr.h"
8 | #include "usbd_desc.h"
9 | #include "usbd_video_core.h"
10 |
11 |
12 | __ALIGN_BEGIN USB_OTG_CORE_HANDLE USB_OTG_dev __ALIGN_END;
13 |
14 | __IO uint8_t UserButtonPressed = 0;
15 |
16 |
17 | int main(void)
18 | {
19 | RCC_ClocksTypeDef RCC_Clocks;
20 |
21 | /* Initialize LEDs and User_Button on STM32F4-Discovery --------------------*/
22 | STM_EVAL_PBInit(BUTTON_USER, BUTTON_MODE_GPIO);
23 |
24 | STM_EVAL_LEDInit(LED4);
25 | STM_EVAL_LEDInit(LED3);
26 | STM_EVAL_LEDInit(LED5);
27 | STM_EVAL_LEDInit(LED6);
28 |
29 |
30 | RCC_GetClocksFreq(&RCC_Clocks);
31 | SysTick_Config(RCC_Clocks.HCLK_Frequency / 10);
32 |
33 |
34 | USBD_Init(&USB_OTG_dev,
35 | USB_OTG_FS_CORE_ID,
36 | &USR_desc,
37 | &VIDEO_cb,
38 | &USR_cb);
39 |
40 | while(1)
41 | {
42 |
43 | }
44 |
45 | }
46 |
47 |
48 |
49 | void delay_ms(uint32_t ms)
50 | {
51 | volatile uint32_t nCount;
52 | RCC_ClocksTypeDef RCC_Clocks;
53 | RCC_GetClocksFreq (&RCC_Clocks);
54 | nCount=(RCC_Clocks.HCLK_Frequency/10000)*ms;
55 | for (; nCount!=0; nCount--);
56 | }
57 |
58 |
59 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/main.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file main.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief Header for main.c module
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4_DISCOVERY_DEMO_H
24 | #define __STM32F4_DISCOVERY_DEMO_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 | #include
29 |
30 | /* Exported types ------------------------------------------------------------*/
31 | /* Exported constants --------------------------------------------------------*/
32 | /* TIM2 Autoreload and Capture Compare register values */
33 | #define TIM_ARR (uint16_t)1999
34 | #define TIM_CCR (uint16_t)1000
35 |
36 | /* MEMS Microphone SPI Interface */
37 | #define SPI_SCK_PIN GPIO_Pin_10
38 | #define SPI_SCK_GPIO_PORT GPIOB
39 | #define SPI_SCK_GPIO_CLK RCC_AHB1Periph_GPIOB
40 | #define SPI_SCK_SOURCE GPIO_PinSource10
41 | #define SPI_SCK_AF GPIO_AF_SPI2
42 |
43 | #define SPI_MOSI_PIN GPIO_Pin_3
44 | #define SPI_MOSI_GPIO_PORT GPIOC
45 | #define SPI_MOSI_GPIO_CLK RCC_AHB1Periph_GPIOC
46 | #define SPI_MOSI_SOURCE GPIO_PinSource3
47 | #define SPI_MOSI_AF GPIO_AF_SPI2
48 |
49 | /* Exported macro ------------------------------------------------------------*/
50 | #define ABS(x) (x < 0) ? (-x) : x
51 | #define MAX(a,b) (a < b) ? (b) : a
52 | /* Exported functions ------------------------------------------------------- */
53 | void TimingDelay_Decrement(void);
54 | void Delay(__IO uint32_t nTime);
55 | void Fail_Handler(void);
56 | #endif /* __STM32F4_DISCOVERY_DEMO_H */
57 |
58 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
59 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_it.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 19-September-2011
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F4xx_IT_H
24 | #define __STM32F4xx_IT_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "usb_conf.h"
32 |
33 | /* Exported types ------------------------------------------------------------*/
34 | /* Exported constants --------------------------------------------------------*/
35 | /* Exported macro ------------------------------------------------------------*/
36 | /* Exported functions ------------------------------------------------------- */
37 |
38 | void NMI_Handler(void);
39 | void HardFault_Handler(void);
40 | void MemManage_Handler(void);
41 | void BusFault_Handler(void);
42 | void UsageFault_Handler(void);
43 | void SVC_Handler(void);
44 | void DebugMon_Handler(void);
45 | void PendSV_Handler(void);
46 | void SysTick_Handler(void);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 | #endif /* __STM32F4xx_IT_H */
53 |
54 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
55 |
--------------------------------------------------------------------------------
/iar_uvc_nv12/iar_uvc_test/usbd_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_conf.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 22-July-2011
7 | * @brief USB Device configuration file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CONF__H__
24 | #define __USBD_CONF__H__
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | #include "stm32f4_discovery.h"
28 |
29 | #define USBD_CFG_MAX_NUM 1
30 | #define USBD_ITF_MAX_NUM 1
31 | #define USB_MAX_STR_DESC_SIZ 200
32 |
33 |
34 |
35 |
36 | #endif //__USBD_CONF__H__
37 |
38 |
--------------------------------------------------------------------------------