Showing preview only (5,686K chars total). Download the full file or copy to clipboard to get everything.
Repository: Ttl/fmcw2
Branch: master
Commit: 7f5f835ee7cf
Files: 728
Total size: 5.3 MB
Directory structure:
gitextract_b54prupg/
├── .gitignore
├── README.md
├── firmware/
│ ├── CMakeLists.txt
│ ├── COPYING
│ ├── blinky/
│ │ ├── CMakeLists.txt
│ │ └── blinky.c
│ ├── cmake_install.cmake
│ ├── common/
│ │ ├── LPC4320_M4_memory.ld
│ │ ├── LPC4330_M4_memory.ld
│ │ ├── LPC43xx_M0_memory.ld
│ │ ├── LPC43xx_M4_M0_image_from_text.ld
│ │ ├── LPC43xx_M4_memory.ld
│ │ ├── bitband.c
│ │ ├── bitband.h
│ │ ├── fault_handler.c
│ │ ├── fault_handler.h
│ │ ├── gpdma.c
│ │ ├── gpdma.h
│ │ ├── hackrf_core.c
│ │ ├── hackrf_core.h
│ │ ├── m0_bin.s.cmake
│ │ ├── m0_sleep.c
│ │ ├── mcp4022.c
│ │ ├── mcp4022.h
│ │ ├── rf_path.c
│ │ ├── rf_path.h
│ │ ├── rom_iap.c
│ │ ├── rom_iap.h
│ │ ├── sgpio.c
│ │ ├── sgpio.h
│ │ ├── streaming.c
│ │ ├── streaming.h
│ │ ├── usb.c
│ │ ├── usb.h
│ │ ├── usb_queue.c
│ │ ├── usb_queue.h
│ │ ├── usb_request.c
│ │ ├── usb_request.h
│ │ ├── usb_standard_request.c
│ │ ├── usb_standard_request.h
│ │ ├── usb_type.h
│ │ ├── w25q80bv.c
│ │ └── w25q80bv.h
│ ├── hackrf-common.cmake
│ ├── hackrf_usb/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_usb.c
│ │ ├── sgpio_isr.c
│ │ ├── sgpio_isr.h
│ │ ├── usb_api_board_info.c
│ │ ├── usb_api_board_info.h
│ │ ├── usb_api_cpld.c
│ │ ├── usb_api_cpld.h
│ │ ├── usb_api_register.c
│ │ ├── usb_api_register.h
│ │ ├── usb_api_spiflash.c
│ │ ├── usb_api_spiflash.h
│ │ ├── usb_api_transceiver.c
│ │ ├── usb_api_transceiver.h
│ │ ├── usb_bulk_buffer.c
│ │ ├── usb_bulk_buffer.h
│ │ ├── usb_descriptor.c
│ │ ├── usb_descriptor.h
│ │ ├── usb_device.c
│ │ ├── usb_device.h
│ │ ├── usb_endpoint.c
│ │ └── usb_endpoint.h
│ ├── libopencm3/
│ │ ├── .gitignore
│ │ ├── COPYING.GPL3
│ │ ├── COPYING.LGPL3
│ │ ├── HACKING
│ │ ├── HACKING_COMMON_DOC
│ │ ├── Makefile
│ │ ├── README
│ │ ├── doc/
│ │ │ ├── Doxyfile
│ │ │ ├── Doxyfile_common
│ │ │ ├── DoxygenLayout.xml
│ │ │ ├── HACKING
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── cm3/
│ │ │ │ ├── Doxyfile
│ │ │ │ └── DoxygenLayout_cm3.xml
│ │ │ ├── efm32g/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32g.xml
│ │ │ │ └── header_efm32g.tex
│ │ │ ├── efm32gg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32gg.xml
│ │ │ │ └── header_efm32gg.tex
│ │ │ ├── efm32lg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32lg.xml
│ │ │ │ └── header_efm32lg.tex
│ │ │ ├── efm32tg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32tg.xml
│ │ │ │ └── header_efm32tg.tex
│ │ │ ├── index.html
│ │ │ ├── lm3s/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lm3s.xml
│ │ │ │ └── header_lm3s.tex
│ │ │ ├── lm4f/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lm4f.xml
│ │ │ │ └── header_lm4f.tex
│ │ │ ├── lpc13xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc13xx.xml
│ │ │ │ └── header_lpc13xx.tex
│ │ │ ├── lpc17xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc17xx.xml
│ │ │ │ └── header_lpc17xx.tex
│ │ │ ├── lpc43xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc43xx.xml
│ │ │ │ └── header_lpc43xx.tex
│ │ │ ├── stm32f0/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f0.xml
│ │ │ │ ├── header_stm32f0.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f1/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f1.xml
│ │ │ │ ├── header_stm32f1.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f2/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f2.xml
│ │ │ │ ├── header_stm32f2.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f3/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f3.xml
│ │ │ │ ├── header_stm32f3.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f4/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f4.xml
│ │ │ │ ├── header_stm32f4.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32l1/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32l1.xml
│ │ │ │ ├── header_stm32l1.tex
│ │ │ │ └── index.html
│ │ │ └── usb/
│ │ │ ├── Doxyfile
│ │ │ ├── Doxyfile_latex
│ │ │ ├── DoxygenLayout_usb.xml
│ │ │ └── header_usb.tex
│ │ ├── include/
│ │ │ ├── libopencm3/
│ │ │ │ ├── cm3/
│ │ │ │ │ ├── assert.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── cortex.h
│ │ │ │ │ ├── doc-cm3.h
│ │ │ │ │ ├── fpb.h
│ │ │ │ │ ├── itm.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── mpu.h
│ │ │ │ │ ├── scb.h
│ │ │ │ │ ├── scs.h
│ │ │ │ │ ├── sync.h
│ │ │ │ │ ├── systick.h
│ │ │ │ │ ├── tpiu.h
│ │ │ │ │ └── vector.h
│ │ │ │ ├── docmain.dox
│ │ │ │ ├── efm32/
│ │ │ │ │ ├── efm32g/
│ │ │ │ │ │ ├── doc-efm32g.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32gg/
│ │ │ │ │ │ ├── doc-efm32gg.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32lg/
│ │ │ │ │ │ ├── doc-efm32lg.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32tg/
│ │ │ │ │ │ ├── doc-efm32tg.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── license.dox
│ │ │ │ ├── lm3s/
│ │ │ │ │ ├── doc-lm3s.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ └── systemcontrol.h
│ │ │ │ ├── lm4f/
│ │ │ │ │ ├── doc-lm4f.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── rcc.h
│ │ │ │ │ ├── systemcontrol.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ └── usb.h
│ │ │ │ ├── lpc13xx/
│ │ │ │ │ ├── doc-lpc13xx.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── lpc17xx/
│ │ │ │ │ ├── doc-lpc17xx.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── lpc43xx/
│ │ │ │ │ ├── adc.h
│ │ │ │ │ ├── atimer.h
│ │ │ │ │ ├── ccu.h
│ │ │ │ │ ├── cgu.h
│ │ │ │ │ ├── creg.h
│ │ │ │ │ ├── doc-lpc43xx.h
│ │ │ │ │ ├── eventrouter.h
│ │ │ │ │ ├── gima.h
│ │ │ │ │ ├── gpdma.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── i2c.h
│ │ │ │ │ ├── i2s.h
│ │ │ │ │ ├── ipc.h
│ │ │ │ │ ├── m0/
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── m4/
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── rgu.h
│ │ │ │ │ ├── ritimer.h
│ │ │ │ │ ├── rtc.h
│ │ │ │ │ ├── scu.h
│ │ │ │ │ ├── sdio.h
│ │ │ │ │ ├── sgpio.h
│ │ │ │ │ ├── spi.h
│ │ │ │ │ ├── spifi.h
│ │ │ │ │ ├── ssp.h
│ │ │ │ │ ├── timer.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ ├── usb.h
│ │ │ │ │ └── wwdt.h
│ │ │ │ ├── sam/
│ │ │ │ │ ├── 3n/
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ ├── 3x/
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ ├── eefc.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── pio.h
│ │ │ │ │ ├── pmc.h
│ │ │ │ │ ├── pwm.h
│ │ │ │ │ ├── tc.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ ├── usart.h
│ │ │ │ │ └── wdt.h
│ │ │ │ ├── stm32/
│ │ │ │ │ ├── adc.h
│ │ │ │ │ ├── can.h
│ │ │ │ │ ├── cec.h
│ │ │ │ │ ├── common/
│ │ │ │ │ │ ├── crc_common_all.h
│ │ │ │ │ │ ├── crypto_common_f24.h
│ │ │ │ │ │ ├── dac_common_all.h
│ │ │ │ │ │ ├── dma_common_f24.h
│ │ │ │ │ │ ├── dma_common_l1f013.h
│ │ │ │ │ │ ├── exti_common_all.h
│ │ │ │ │ │ ├── exti_common_l1f24.h
│ │ │ │ │ │ ├── flash_common_f234.h
│ │ │ │ │ │ ├── flash_common_f24.h
│ │ │ │ │ │ ├── gpio_common_all.h
│ │ │ │ │ │ ├── gpio_common_f234.h
│ │ │ │ │ │ ├── gpio_common_f24.h
│ │ │ │ │ │ ├── hash_common_f24.h
│ │ │ │ │ │ ├── i2c_common_all.h
│ │ │ │ │ │ ├── i2c_common_f24.h
│ │ │ │ │ │ ├── iwdg_common_all.h
│ │ │ │ │ │ ├── pwr_common_all.h
│ │ │ │ │ │ ├── rng_common_f24.h
│ │ │ │ │ │ ├── rtc_common_l1f024.h
│ │ │ │ │ │ ├── spi_common_all.h
│ │ │ │ │ │ ├── spi_common_f124.h
│ │ │ │ │ │ ├── spi_common_f24.h
│ │ │ │ │ │ ├── syscfg_common_l1f234.h
│ │ │ │ │ │ ├── timer_common_all.h
│ │ │ │ │ │ ├── timer_common_f24.h
│ │ │ │ │ │ ├── usart_common_all.h
│ │ │ │ │ │ ├── usart_common_f124.h
│ │ │ │ │ │ └── usart_common_f24.h
│ │ │ │ │ ├── comparator.h
│ │ │ │ │ ├── crc.h
│ │ │ │ │ ├── crypto.h
│ │ │ │ │ ├── dac.h
│ │ │ │ │ ├── dbgmcu.h
│ │ │ │ │ ├── desig.h
│ │ │ │ │ ├── dma.h
│ │ │ │ │ ├── exti.h
│ │ │ │ │ ├── f0/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── cec.h
│ │ │ │ │ │ ├── comparator.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f0.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ ├── tsc.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f1/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── bkp.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f1.h
│ │ │ │ │ │ ├── ethernet.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f2/
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── crypto.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f2.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── hash.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rng.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f3/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f3.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f4/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── crypto.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f4.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── hash.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rng.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── flash.h
│ │ │ │ │ ├── fsmc.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── hash.h
│ │ │ │ │ ├── i2c.h
│ │ │ │ │ ├── iwdg.h
│ │ │ │ │ ├── l1/
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32l1.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── otg_fs.h
│ │ │ │ │ ├── otg_hs.h
│ │ │ │ │ ├── pwr.h
│ │ │ │ │ ├── rcc.h
│ │ │ │ │ ├── rtc.h
│ │ │ │ │ ├── sdio.h
│ │ │ │ │ ├── spi.h
│ │ │ │ │ ├── syscfg.h
│ │ │ │ │ ├── timer.h
│ │ │ │ │ ├── tools.h
│ │ │ │ │ ├── tsc.h
│ │ │ │ │ ├── usart.h
│ │ │ │ │ ├── usb.h
│ │ │ │ │ ├── usb_desc.h
│ │ │ │ │ └── wwdg.h
│ │ │ │ └── usb/
│ │ │ │ ├── cdc.h
│ │ │ │ ├── dfu.h
│ │ │ │ ├── doc-usb.h
│ │ │ │ ├── hid.h
│ │ │ │ ├── usbd.h
│ │ │ │ └── usbstd.h
│ │ │ └── libopencmsis/
│ │ │ ├── core_cm3.h
│ │ │ └── dispatch/
│ │ │ └── irqhandlers.h
│ │ ├── ld/
│ │ │ └── devices.data
│ │ ├── lib/
│ │ │ ├── Makefile.include
│ │ │ ├── cm3/
│ │ │ │ ├── assert.c
│ │ │ │ ├── nvic.c
│ │ │ │ ├── scb.c
│ │ │ │ ├── sync.c
│ │ │ │ ├── systick.c
│ │ │ │ └── vector.c
│ │ │ ├── dispatch/
│ │ │ │ └── vector_chipset.c
│ │ │ ├── efm32/
│ │ │ │ ├── efm32g/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_efm32g.ld
│ │ │ │ │ └── libopencm3_efm32g880f128.ld
│ │ │ │ ├── efm32gg/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_efm32gg.ld
│ │ │ │ │ └── libopencm3_efm32gg990f1024.ld
│ │ │ │ ├── efm32lg/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_efm32lg.ld
│ │ │ │ └── efm32tg/
│ │ │ │ ├── Makefile
│ │ │ │ ├── libopencm3_efm32tg.ld
│ │ │ │ └── libopencm3_efm32tg840f32.ld
│ │ │ ├── linker.ld.S
│ │ │ ├── lm3s/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lm3s.ld
│ │ │ ├── lm4f/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ ├── libopencm3_lm4f.ld
│ │ │ │ ├── rcc.c
│ │ │ │ ├── systemcontrol.c
│ │ │ │ ├── uart.c
│ │ │ │ └── usb_lm4f.c
│ │ │ ├── lpc13xx/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lpc13xx.ld
│ │ │ ├── lpc17xx/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lpc17xx.ld
│ │ │ ├── lpc43xx/
│ │ │ │ ├── gpio.c
│ │ │ │ ├── i2c.c
│ │ │ │ ├── ipc.c
│ │ │ │ ├── m0/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_lpc43xx_m0.ld
│ │ │ │ ├── m4/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_lpc43xx.ld
│ │ │ │ │ ├── libopencm3_lpc43xx_ram_only.ld
│ │ │ │ │ ├── libopencm3_lpc43xx_rom_to_ram.ld
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ ├── scu.c
│ │ │ │ ├── ssp.c
│ │ │ │ ├── timer.c
│ │ │ │ └── uart.c
│ │ │ ├── lpc43xx_m0/
│ │ │ │ ├── Makefile
│ │ │ │ └── vector.c
│ │ │ ├── sam/
│ │ │ │ ├── 3n/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_sam3n.ld
│ │ │ │ ├── 3x/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_sam3x.ld
│ │ │ │ └── common/
│ │ │ │ ├── gpio.c
│ │ │ │ ├── pmc.c
│ │ │ │ └── usart.c
│ │ │ ├── stm32/
│ │ │ │ ├── can.c
│ │ │ │ ├── common/
│ │ │ │ │ ├── crc_common_all.c
│ │ │ │ │ ├── crypto_common_f24.c
│ │ │ │ │ ├── dac_common_all.c
│ │ │ │ │ ├── dma_common_f24.c
│ │ │ │ │ ├── dma_common_l1f013.c
│ │ │ │ │ ├── exti_common_all.c
│ │ │ │ │ ├── flash_common_f234.c
│ │ │ │ │ ├── flash_common_f24.c
│ │ │ │ │ ├── gpio_common_all.c
│ │ │ │ │ ├── gpio_common_f0234.c
│ │ │ │ │ ├── hash_common_f24.c
│ │ │ │ │ ├── i2c_common_all.c
│ │ │ │ │ ├── iwdg_common_all.c
│ │ │ │ │ ├── pwr_common_all.c
│ │ │ │ │ ├── rtc_common_l1f024.c
│ │ │ │ │ ├── spi_common_all.c
│ │ │ │ │ ├── spi_common_f124.c
│ │ │ │ │ ├── timer_common_all.c
│ │ │ │ │ ├── timer_common_f234.c
│ │ │ │ │ ├── timer_common_f24.c
│ │ │ │ │ ├── usart_common_all.c
│ │ │ │ │ └── usart_common_f124.c
│ │ │ │ ├── desig.c
│ │ │ │ ├── f0/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── comparator.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f0.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── syscfg.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f1/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── ethernet.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f1.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── stm32f100x4.ld
│ │ │ │ │ ├── stm32f100x6.ld
│ │ │ │ │ ├── stm32f100x8.ld
│ │ │ │ │ ├── stm32f100xb.ld
│ │ │ │ │ ├── stm32f100xc.ld
│ │ │ │ │ ├── stm32f100xd.ld
│ │ │ │ │ ├── stm32f100xe.ld
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f2/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f2.ld
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f3/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f3.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ ├── usart.c
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ ├── f4/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── crypto.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f4.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── stm32f405x6.ld
│ │ │ │ │ ├── timer.c
│ │ │ │ │ ├── usart.c
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ └── l1/
│ │ │ │ ├── Makefile
│ │ │ │ ├── crc.c
│ │ │ │ ├── dac.c
│ │ │ │ ├── dma.c
│ │ │ │ ├── flash.c
│ │ │ │ ├── gpio.c
│ │ │ │ ├── i2c.c
│ │ │ │ ├── iwdg.c
│ │ │ │ ├── libopencm3_stm32l1.ld
│ │ │ │ ├── pwr.c
│ │ │ │ ├── rcc.c
│ │ │ │ ├── rtc.c
│ │ │ │ ├── spi.c
│ │ │ │ ├── stm32l15xx6.ld
│ │ │ │ ├── stm32l15xx8.ld
│ │ │ │ ├── stm32l15xxb.ld
│ │ │ │ ├── stm32l15xxc.ld
│ │ │ │ ├── stm32l15xxd.ld
│ │ │ │ ├── timer.c
│ │ │ │ └── usart.c
│ │ │ └── usb/
│ │ │ ├── usb.c
│ │ │ ├── usb_control.c
│ │ │ ├── usb_f103.c
│ │ │ ├── usb_f107.c
│ │ │ ├── usb_f207.c
│ │ │ ├── usb_fx07_common.c
│ │ │ ├── usb_fx07_common.h
│ │ │ ├── usb_private.h
│ │ │ └── usb_standard.c
│ │ ├── locm3.sublime-project
│ │ └── scripts/
│ │ ├── black_magic_probe_debug.scr
│ │ ├── black_magic_probe_flash.scr
│ │ ├── checkpatch.pl
│ │ ├── data/
│ │ │ └── lpc43xx/
│ │ │ ├── README
│ │ │ ├── adc.csv
│ │ │ ├── adc.yaml
│ │ │ ├── atimer.csv
│ │ │ ├── atimer.yaml
│ │ │ ├── ccu.csv
│ │ │ ├── ccu.yaml
│ │ │ ├── cgu.csv
│ │ │ ├── cgu.yaml
│ │ │ ├── creg.csv
│ │ │ ├── creg.yaml
│ │ │ ├── csv2yaml.py
│ │ │ ├── eventrouter.csv
│ │ │ ├── eventrouter.yaml
│ │ │ ├── gen.py
│ │ │ ├── gima.csv
│ │ │ ├── gima.yaml
│ │ │ ├── gpdma.csv
│ │ │ ├── gpdma.yaml
│ │ │ ├── gpio.csv
│ │ │ ├── gpio.yaml
│ │ │ ├── i2c.csv
│ │ │ ├── i2c.yaml
│ │ │ ├── i2s.csv
│ │ │ ├── i2s.yaml
│ │ │ ├── rgu.csv
│ │ │ ├── rgu.yaml
│ │ │ ├── ritimer.csv
│ │ │ ├── ritimer.yaml
│ │ │ ├── rtc.csv
│ │ │ ├── rtc.yaml
│ │ │ ├── scu.csv
│ │ │ ├── scu.yaml
│ │ │ ├── sgpio.csv
│ │ │ ├── sgpio.yaml
│ │ │ ├── spi.csv
│ │ │ ├── spi.yaml
│ │ │ ├── spifi.csv
│ │ │ ├── spifi.yaml
│ │ │ ├── ssp.csv
│ │ │ ├── ssp.yaml
│ │ │ ├── usb.csv
│ │ │ ├── usb.yaml
│ │ │ └── yaml_odict.py
│ │ ├── genlink.awk
│ │ ├── irq2nvic_h
│ │ └── lpcvtcksum
│ ├── m0_bin.s
│ └── toolchain-arm-cortex-m.cmake
├── hardware/
│ ├── README.md
│ ├── fmcw2/
│ │ ├── fmcw2-cache.lib
│ │ ├── fmcw2-rescue.lib
│ │ ├── fmcw2.kicad_pcb
│ │ ├── fmcw2.pro
│ │ ├── fmcw2.sch
│ │ └── libs/
│ │ └── fmcw2.lib
│ └── fmcw2_mcu/
│ ├── fmcw2_mcu-cache.lib
│ ├── fmcw2_mcu-rescue.lib
│ ├── fmcw2_mcu.kicad_pcb
│ ├── fmcw2_mcu.pro
│ └── fmcw2_mcu.sch
├── host/
│ ├── CMakeLists.txt
│ ├── COPYING
│ ├── cmake/
│ │ ├── cmake_uninstall.cmake.in
│ │ └── modules/
│ │ ├── FindLIBHACKRF.cmake
│ │ ├── FindThreads.cmake
│ │ └── FindUSB1.cmake
│ ├── hackrf-tools/
│ │ ├── CMakeLists.txt
│ │ ├── Readme.md
│ │ ├── getopt/
│ │ │ ├── getopt.c
│ │ │ └── getopt.h
│ │ └── src/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_info.c
│ │ ├── hackrf_spiflash.c
│ │ └── hackrf_transfer.c
│ └── libhackrf/
│ ├── 53-hackrf.rules
│ ├── 53-hackrf.rules.in
│ ├── CMakeLists.txt
│ ├── libhackrf.pc.in
│ └── src/
│ ├── CMakeLists.txt
│ ├── hackrf.c
│ └── hackrf.h
└── processing/
├── analysis.py
├── bicycle_sar.py
├── filter.py
├── fir/
│ ├── Makefile
│ ├── fir.c
│ └── taps.h
├── sar_autofocus.py
├── sar_process.py
└── sync_analysis.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.swp
*.pyc
================================================
FILE: README.md
================================================
FMCW radar hardware, firmware and processing software.
Folders:
hardware: KiCad hardware design files.
- fmcw2: RF board.
- fmcw2_mcu: Digital board.
firmware:
- Firmware for LPC4320 microcontroller. Based on [HackRF](https://github.com/mossmann/hackrf) firmware.
host:
- Host programs for recording data, programming firmware. Also from HackRF with small modifications.
processing:
- fir: Resamples, filters and repackages samples for other programs.
- filter.py: Output FIR filter coefficients for fir C program.
- analysis.py: Various analyses about the recorded data.
- sar_bicycle.py: Pre-processing of raw data.
- sar_process.py: Focus raw data to SAR image.
- sar_autofocus.py: Simple minimum entropy autofocusing of SAR image.
SAR focusing program is loosely based on Matlab program by Gregory L. Charvat
and it also includes some functions from [RITSAR](https://github.com/dm6718/RITSAR).
================================================
FILE: firmware/CMakeLists.txt
================================================
# Copyright 2012 Jared Boone <jared@sharebrained.com>
#
# This file is part of HackRF.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
# Top directory CMake project for HackRF firmware
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake)
project (hackrf_firmware_all)
add_subdirectory(blinky)
add_subdirectory(sgpio)
add_subdirectory(startup)
add_subdirectory(hackrf_usb)
================================================
FILE: firmware/COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
================================================
FILE: firmware/blinky/CMakeLists.txt
================================================
# Copyright 2012 Michael Ossmann <mike@ossmann.com>
# Copyright 2012 Jared Boone <jared@sharebrained.com>
#
# This file is part of HackRF.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(blinky)
include(../hackrf-common.cmake)
set(SRC_M4
blinky.c
)
DeclareTargets()
================================================
FILE: firmware/blinky/blinky.c
================================================
/*
* Copyright 2010 - 2012 Michael Ossmann
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include "hackrf_core.h"
uint32_t boot0, boot1, boot2, boot3;
int main(void)
{
int i;
pin_setup();
gpio_clear(PORT_ADC_NOE, PIN_ADC_NOE); /* Enable ADC */
/* Blink LED1/2/3 on the board and Read BOOT0/1/2/3 pins. */
while (1)
{
boot0 = BOOT0_STATE;
boot1 = BOOT1_STATE;
boot2 = BOOT2_STATE;
boot3 = BOOT3_STATE;
gpio_set(PORT_LED1_3, PIN_LED1); /* LEDs on */
for (i = 0; i < 2000000; i++) /* Wait a bit. */
__asm__("nop");
gpio_clear(PORT_LED1_3, PIN_LED1); /* LED off */
for (i = 0; i < 2000000; i++) /* Wait a bit. */
__asm__("nop");
}
return 0;
}
================================================
FILE: firmware/cmake_install.cmake
================================================
# Install script for directory: /home/henrik/koodi/fmcw2/firmware/blinky
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/media/sda2/media/home/Lataukset/gcc-arm-none-eabi-4_9-2015q2/arm-none-eabi")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
file(WRITE "/home/henrik/koodi/fmcw2/firmware/${CMAKE_INSTALL_MANIFEST}" "")
foreach(file ${CMAKE_INSTALL_MANIFEST_FILES})
file(APPEND "/home/henrik/koodi/fmcw2/firmware/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
endforeach()
================================================
FILE: firmware/common/LPC4320_M4_memory.ld
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
/* Linker script for HackRF One (LPC4320, 1M SPI flash, 200K SRAM). */
MEMORY
{
/* rom is really the shadow region that points to SPI flash or elsewhere */
rom (rx) : ORIGIN = 0x00000000, LENGTH = 96K
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 96K
ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 32K
ram_sleep (rwx) : ORIGIN = 0x10088000, LENGTH = 8K
}
INCLUDE LPC43xx_M4_memory.ld
================================================
FILE: firmware/common/LPC4330_M4_memory.ld
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
/* Linker script for HackRF Jellybean/Jawbreaker (LPC4330, 1M SPI flash, 264K SRAM). */
MEMORY
{
/* rom is really the shadow region that points to SPI flash or elsewhere */
rom (rx) : ORIGIN = 0x00000000, LENGTH = 128K
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 128K
ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 64K
ram_sleep (rwx) : ORIGIN = 0x10090000, LENGTH = 8K
}
INCLUDE LPC43xx_M4_memory.ld
================================================
FILE: firmware/common/LPC43xx_M0_memory.ld
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
MEMORY
{
ram (rwx) : ORIGIN = 0x00000000, LENGTH = 28K
}
================================================
FILE: firmware/common/LPC43xx_M4_M0_image_from_text.ld
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
SECTIONS
{
.text : {
PROVIDE(__m0_start__ = .);
KEEP(*(.m0_bin*));
. = ALIGN(4);
PROVIDE(__m0_end__ = .);
} >rom
}
================================================
FILE: firmware/common/LPC43xx_M4_memory.ld
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
MEMORY
{
/* Physical address in Flash used to copy Code from Flash to RAM */
rom_flash (rx) : ORIGIN = 0x80000000, LENGTH = 1M
ram_m0 (rwx) : ORIGIN = 0x20000000, LENGTH = 28K
ram_shared (rwx) : ORIGIN = 0x20007000, LENGTH = 4K
ram_usb (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
/* ram_usb: USB buffer. Straddles two blocks of RAM
* to get performance benefit of having two USB buffers addressable
* simultaneously (on two different buses of the AHB multilayer matrix)
*/
}
usb_bulk_buffer = ORIGIN(ram_usb);
================================================
FILE: firmware/common/bitband.c
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "bitband.h"
volatile uint32_t* peripheral_bitband_address(volatile void* const address, const uint_fast8_t bit_number) {
const uint32_t bit_band_base = 0x42000000;
const uint32_t byte_offset = (uint32_t)address - 0x40000000;
const uint32_t bit_word_offset = (byte_offset * 32) + (bit_number * 4);
const uint32_t bit_word_address = bit_band_base + bit_word_offset;
return (volatile uint32_t*)bit_word_address;
}
void peripheral_bitband_set(volatile void* const peripheral_address, const uint_fast8_t bit_number) {
volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number);
*bitband_address = 1;
}
void peripheral_bitband_clear(volatile void* const peripheral_address, const uint_fast8_t bit_number) {
volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number);
*bitband_address = 0;
}
uint32_t peripheral_bitband_get(volatile void* const peripheral_address, const uint_fast8_t bit_number) {
volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number);
return *bitband_address;
}
================================================
FILE: firmware/common/bitband.h
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __BITBAND_H__
#define __BITBAND_H__
#include <stdint.h>
volatile uint32_t* peripheral_bitband_address(volatile void* const address, const uint_fast8_t bit_number);
void peripheral_bitband_set(volatile void* const peripheral_address, const uint_fast8_t bit_number);
void peripheral_bitband_clear(volatile void* const peripheral_address, const uint_fast8_t bit_number);
uint32_t peripheral_bitband_get(volatile void* const peripheral_address, const uint_fast8_t bit_number);
#endif//__BITBAND_H__
================================================
FILE: firmware/common/fault_handler.c
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
* Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include "fault_handler.h"
typedef struct
{
uint32_t r0;
uint32_t r1;
uint32_t r2;
uint32_t r3;
uint32_t r12;
uint32_t lr; /* Link Register. */
uint32_t pc; /* Program Counter. */
uint32_t psr;/* Program Status Register. */
} hard_fault_stack_t;
__attribute__((naked))
void hard_fault_handler(void) {
__asm__("TST LR, #4");
__asm__("ITE EQ");
__asm__("MRSEQ R0, MSP");
__asm__("MRSNE R0, PSP");
__asm__("B hard_fault_handler_c");
}
volatile hard_fault_stack_t* hard_fault_stack_pt;
__attribute__((used)) void hard_fault_handler_c(uint32_t* args)
{
/* hard_fault_stack_pt contains registers saved before the hard fault */
hard_fault_stack_pt = (hard_fault_stack_t*)args;
// args[0-7]: r0, r1, r2, r3, r12, lr, pc, psr
// Other interesting registers to examine:
// CFSR: Configurable Fault Status Register
// HFSR: Hard Fault Status Register
// DFSR: Debug Fault Status Register
// AFSR: Auxiliary Fault Status Register
// MMAR: MemManage Fault Address Register
// BFAR: Bus Fault Address Register
/*
if( SCB->HFSR & SCB_HFSR_FORCED ) {
if( SCB->CFSR & SCB_CFSR_BFSR_BFARVALID ) {
SCB->BFAR;
if( SCB->CFSR & CSCB_CFSR_BFSR_PRECISERR ) {
}
}
}
*/
while(1);
}
void mem_manage_handler() {
while(1);
}
void bus_fault_handler() {
while(1);
}
void usage_fault_handler() {
while(1);
}
================================================
FILE: firmware/common/fault_handler.h
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __FAULT_HANDLER__
#define __FAULT_HANDLER__
#include <stdint.h>
#include <libopencm3/cm3/memorymap.h>
// TODO: Move all this to a Cortex-M(?) include file, since these
// structures are supposedly the same between processors (to an
// undetermined extent).
typedef struct armv7m_scb_t armv7m_scb_t;
struct armv7m_scb_t {
volatile const uint32_t CPUID;
volatile uint32_t ICSR;
volatile uint32_t VTOR;
volatile uint32_t AIRCR;
volatile uint32_t SCR;
volatile uint32_t CCR;
volatile uint32_t SHPR1;
volatile uint32_t SHPR2;
volatile uint32_t SHPR3;
volatile uint32_t SHCSR;
volatile uint32_t CFSR;
volatile uint32_t HFSR;
volatile uint32_t DFSR;
volatile uint32_t MMFAR;
volatile uint32_t BFAR;
volatile uint32_t AFSR;
volatile const uint32_t ID_PFR0;
volatile const uint32_t ID_PFR1;
volatile const uint32_t ID_DFR0;
volatile const uint32_t ID_AFR0;
volatile const uint32_t ID_MMFR0;
volatile const uint32_t ID_MMFR1;
volatile const uint32_t ID_MMFR2;
volatile const uint32_t ID_MMFR3;
volatile const uint32_t ID_ISAR0;
volatile const uint32_t ID_ISAR1;
volatile const uint32_t ID_ISAR2;
volatile const uint32_t ID_ISAR3;
volatile const uint32_t ID_ISAR4;
volatile const uint32_t __reserved_0x74_0x87[5];
volatile uint32_t CPACR;
} __attribute__((packed));
static armv7m_scb_t* const SCB = (armv7m_scb_t*)SCB_BASE;
#define SCB_HFSR_DEBUGEVT (1 << 31)
#define SCB_HFSR_FORCED (1 << 30)
#define SCB_HFSR_VECTTBL (1 << 1)
#endif//__FAULT_HANDLER__
================================================
FILE: firmware/common/gpdma.c
================================================
/*
* Copyright 2013 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <gpdma.h>
#include <libopencm3/lpc43xx/gpdma.h>
void gpdma_controller_enable() {
GPDMA_CONFIG |= GPDMA_CONFIG_E(1);
while( (GPDMA_CONFIG & GPDMA_CONFIG_E_MASK) == 0 );
}
void gpdma_channel_enable(const uint_fast8_t channel) {
GPDMA_CCONFIG(channel) |= GPDMA_CCONFIG_E(1);
}
void gpdma_channel_disable(const uint_fast8_t channel) {
GPDMA_CCONFIG(channel) &= ~GPDMA_CCONFIG_E_MASK;
while( (GPDMA_ENBLDCHNS & GPDMA_ENBLDCHNS_ENABLEDCHANNELS(1 << channel)) );
}
void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel) {
GPDMA_INTTCCLEAR = GPDMA_INTTCCLEAR_INTTCCLEAR(1 << channel);
}
void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel) {
GPDMA_INTERRCLR = GPDMA_INTERRCLR_INTERRCLR(1 << channel);
}
void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli) {
lli->ccontrol |= GPDMA_CCONTROL_I(1);
}
void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count) {
for(size_t i=0; i<lli_count; i++) {
gpdma_lli_t* const next_lli = &lli[(i + 1) % lli_count];
lli[i].clli = (lli[i].clli & ~GPDMA_CLLI_LLI_MASK) | GPDMA_CLLI_LLI((uint32_t)next_lli >> 2);
}
}
void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_count) {
gpdma_lli_create_loop(lli, lli_count);
lli[lli_count - 1].clli &= ~GPDMA_CLLI_LLI_MASK;
}
================================================
FILE: firmware/common/gpdma.h
================================================
/*
* Copyright 2013 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GPDMA_H__
#define __GPDMA_H__
#include <stddef.h>
#include <stdint.h>
#include <libopencm3/lpc43xx/gpdma.h>
void gpdma_controller_enable();
void gpdma_channel_enable(const uint_fast8_t channel);
void gpdma_channel_disable(const uint_fast8_t channel);
void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel);
void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel);
void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli);
void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count);
void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_count);
#endif/*__GPDMA_H__*/
================================================
FILE: firmware/common/hackrf_core.c
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
* Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "hackrf_core.h"
#include "rf_path.h"
#include "sgpio.h"
#include <libopencm3/lpc43xx/i2c.h>
#include <libopencm3/lpc43xx/cgu.h>
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/ssp.h>
#define WAIT_CPU_CLOCK_INIT_DELAY (10000)
void delay(uint32_t duration)
{
uint32_t i;
for (i = 0; i < duration; i++)
__asm__("nop");
}
/* clock startup for Jellybean with Lemondrop attached
Configure PLL1 to max speed (204MHz).
Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1. */
void cpu_clock_init(void)
{
/* use IRC as clock source for APB1 (including I2C0) */
CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_IRC);
/* use IRC as clock source for APB3 */
CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_IRC);
//FIXME disable I2C
/* Kick I2C0 down to 400kHz when we switch over to APB1 clock = 204MHz */
//i2c0_init(255);
/*
* 12MHz clock is entering LPC XTAL1/OSC input now. On
* Jellybean/Lemondrop, this is a signal from the clock generator. On
* Jawbreaker, there is a 12 MHz crystal at the LPC.
* Set up PLL1 to run from XTAL1 input.
*/
//FIXME a lot of the details here should be in a CGU driver
/* set xtal oscillator to low frequency mode */
CGU_XTAL_OSC_CTRL &= ~CGU_XTAL_OSC_CTRL_HF_MASK;
/* power on the oscillator and wait until stable */
CGU_XTAL_OSC_CTRL &= ~CGU_XTAL_OSC_CTRL_ENABLE_MASK;
/* Wait about 100us after Crystal Power ON */
delay(WAIT_CPU_CLOCK_INIT_DELAY);
/* use XTAL_OSC as clock source for BASE_M4_CLK (CPU) */
CGU_BASE_M4_CLK = (CGU_BASE_M4_CLK_CLK_SEL(CGU_SRC_XTAL) | CGU_BASE_M4_CLK_AUTOBLOCK(1));
/* use XTAL_OSC as clock source for APB1 */
CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_AUTOBLOCK(1)
| CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_XTAL);
/* use XTAL_OSC as clock source for APB3 */
CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_AUTOBLOCK(1)
| CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_XTAL);
cpu_clock_pll1_low_speed();
/* use PLL1 as clock source for BASE_M4_CLK (CPU) */
CGU_BASE_M4_CLK = (CGU_BASE_M4_CLK_CLK_SEL(CGU_SRC_PLL1) | CGU_BASE_M4_CLK_AUTOBLOCK(1));
/* use XTAL_OSC as clock source for PLL0USB */
CGU_PLL0USB_CTRL = CGU_PLL0USB_CTRL_PD(1)
| CGU_PLL0USB_CTRL_AUTOBLOCK(1)
| CGU_PLL0USB_CTRL_CLK_SEL(CGU_SRC_XTAL);
while (CGU_PLL0USB_STAT & CGU_PLL0USB_STAT_LOCK_MASK);
/* configure PLL0USB to produce 480 MHz clock from 12 MHz XTAL_OSC */
/* Values from User Manual v1.4 Table 94, for 12MHz oscillator. */
CGU_PLL0USB_MDIV = 0x06167FFA;
CGU_PLL0USB_NP_DIV = 0x00302062;
CGU_PLL0USB_CTRL |= (CGU_PLL0USB_CTRL_PD(1)
| CGU_PLL0USB_CTRL_DIRECTI(1)
| CGU_PLL0USB_CTRL_DIRECTO(1)
| CGU_PLL0USB_CTRL_CLKEN(1));
/* power on PLL0USB and wait until stable */
CGU_PLL0USB_CTRL &= ~CGU_PLL0USB_CTRL_PD_MASK;
while (!(CGU_PLL0USB_STAT & CGU_PLL0USB_STAT_LOCK_MASK));
/* use PLL0USB as clock source for USB0 */
CGU_BASE_USB0_CLK = CGU_BASE_USB0_CLK_AUTOBLOCK(1)
| CGU_BASE_USB0_CLK_CLK_SEL(CGU_SRC_PLL0USB);
/* Switch peripheral clock over to use PLL1 (204MHz) */
CGU_BASE_PERIPH_CLK = CGU_BASE_PERIPH_CLK_AUTOBLOCK(1)
| CGU_BASE_PERIPH_CLK_CLK_SEL(CGU_SRC_PLL1);
/* Switch APB1 clock over to use PLL1 (204MHz) */
CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_AUTOBLOCK(1)
| CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_PLL1);
/* Switch APB3 clock over to use PLL1 (204MHz) */
CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_AUTOBLOCK(1)
| CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_PLL1);
}
/*
Configure PLL1 to low speed (48MHz).
Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1.
This function shall be called after cpu_clock_init().
This function is mainly used to lower power consumption.
*/
void cpu_clock_pll1_low_speed(void)
{
uint32_t pll_reg;
/* Configure PLL1 Clock (48MHz) */
/* Integer mode:
FCLKOUT = M*(FCLKIN/N)
FCCO = 2*P*FCLKOUT = 2*P*M*(FCLKIN/N)
*/
pll_reg = CGU_PLL1_CTRL;
/* Clear PLL1 bits */
pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */
CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */
CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */
CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */
/* Set PLL1 up to 12MHz * 4 = 48MHz. */
pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL)
| CGU_PLL1_CTRL_PSEL(0)
| CGU_PLL1_CTRL_NSEL(0)
| CGU_PLL1_CTRL_MSEL(3)
| CGU_PLL1_CTRL_FBSEL(1)
| CGU_PLL1_CTRL_DIRECT(1);
CGU_PLL1_CTRL = pll_reg;
/* wait until stable */
while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK));
/* Wait a delay after switch to new frequency with Direct mode */
delay(WAIT_CPU_CLOCK_INIT_DELAY);
}
/*
Configure PLL1 (Main MCU Clock) to max speed (204MHz).
Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1.
This function shall be called after cpu_clock_init().
*/
void cpu_clock_pll1_max_speed(void)
{
uint32_t pll_reg;
/* Configure PLL1 to Intermediate Clock (between 90 MHz and 110 MHz) */
/* Integer mode:
FCLKOUT = M*(FCLKIN/N)
FCCO = 2*P*FCLKOUT = 2*P*M*(FCLKIN/N)
*/
pll_reg = CGU_PLL1_CTRL;
/* Clear PLL1 bits */
pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */
CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */
CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */
CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */
/* Set PLL1 up to 12MHz * 8 = 96MHz. */
pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL)
| CGU_PLL1_CTRL_PSEL(0)
| CGU_PLL1_CTRL_NSEL(0)
| CGU_PLL1_CTRL_MSEL(7)
| CGU_PLL1_CTRL_FBSEL(1);
CGU_PLL1_CTRL = pll_reg;
/* wait until stable */
while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK));
/* Wait before to switch to max speed */
delay(WAIT_CPU_CLOCK_INIT_DELAY);
/* Configure PLL1 Max Speed */
/* Direct mode: FCLKOUT = FCCO = M*(FCLKIN/N) */
pll_reg = CGU_PLL1_CTRL;
/* Clear PLL1 bits */
pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */
CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */
CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */
CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */
/* Set PLL1 up to 12MHz * 17 = 204MHz. */
pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL)
| CGU_PLL1_CTRL_PSEL(0)
| CGU_PLL1_CTRL_NSEL(0)
| CGU_PLL1_CTRL_MSEL(16)
| CGU_PLL1_CTRL_FBSEL(1)
| CGU_PLL1_CTRL_DIRECT(1);
CGU_PLL1_CTRL = pll_reg;
/* wait until stable */
while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK));
}
void ssp1_init(void)
{
/*
* Raise ADF4158 CE pin to de-select the device
*/
gpio_clear(PORT_ADF_CE, PIN_ADF_CE);
gpio_clear(PORT_ADF_LE, PIN_ADF_LE);
/* Configure SSP1 Peripheral (to be moved later in SSP driver) */
scu_pinmux(SCU_SSP1_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP1_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP1_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION1));
ssp1_set_mode_16bit();
}
void ssp1_set_mode_16bit(void)
{
/* FIXME speed up once everything is working reliably */
/*
// Freq About 0.0498MHz / 49.8KHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz
const uint8_t serial_clock_rate = 32;
const uint8_t clock_prescale_rate = 128;
*/
// Freq About 4.857MHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz
const uint8_t serial_clock_rate = 21;
const uint8_t clock_prescale_rate = 2;
ssp_init(SSP1_NUM,
SSP_DATA_16BITS,
SSP_FRAME_SPI,
SSP_CPOL_0_CPHA_0,
serial_clock_rate,
clock_prescale_rate,
SSP_MODE_NORMAL,
SSP_MASTER,
SSP_SLAVE_OUT_ENABLE);
}
void ssp1_set_mode_8bit(void)
{
/* FIXME speed up once everything is working reliably */
/*
// Freq About 0.0498MHz / 49.8KHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz
const uint8_t serial_clock_rate = 32;
const uint8_t clock_prescale_rate = 128;
*/
// Freq About 4.857MHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz
const uint8_t serial_clock_rate = 21;
const uint8_t clock_prescale_rate = 2;
ssp_init(SSP1_NUM,
SSP_DATA_8BITS,
SSP_FRAME_SPI,
SSP_CPOL_0_CPHA_0,
serial_clock_rate,
clock_prescale_rate,
SSP_MODE_NORMAL,
SSP_MASTER,
SSP_SLAVE_OUT_ENABLE);
}
void pin_setup(void) {
/* GPIO pinmuxes */
scu_pinmux(SCU_PINMUX_LED1, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4);
scu_pinmux(SCU_ADC_NOE, SCU_GPIO_NOPULL);
scu_pinmux(SCU_PA_OFF, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4);
scu_pinmux(SCU_MIX_ENBL, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4);
scu_pinmux(SCU_ADF_TXDATA, SCU_GPIO_NOPULL);
scu_pinmux(SCU_ADF_CE, SCU_GPIO_FAST);
scu_pinmux(SCU_ADF_LE, SCU_GPIO_FAST);
/* Configure P2_3 as USB0_PPWR */
//scu_pinmux(SCU_OTG_USBV, SCU_CONF_FUNCTION7);
/* Configure all GPIO as Input (safe state) */
GPIO0_DIR = 0;
GPIO1_DIR = 0;
GPIO2_DIR = 0;
GPIO3_DIR = 0;
GPIO4_DIR = 0;
GPIO5_DIR = 0;
GPIO6_DIR = 0;
GPIO7_DIR = 0;
rf_disable();
GPIO5_DIR |= (PIN_LED1);
GPIO0_DIR |= (PIN_ADC_NOE);
GPIO5_DIR |= (PIN_PA_OFF | PIN_MIX_ENBL);
GPIO1_DIR |= (PIN_ADF_LE | PIN_ADF_CE | PIN_ADF_TXDATA);
/* Configure SSP1 Peripheral (to be moved later in SSP driver) */
//scu_pinmux(SCU_SSP1_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP1_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP1_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION1));
//scu_pinmux(SCU_SSP1_SSEL, (SCU_SSP_IO | SCU_CONF_FUNCTION1));
sgpio_configure_pin_functions();
}
================================================
FILE: firmware/common/hackrf_core.h
================================================
/*
* Copyright 2012 Michael Ossmann <mike@ossmann.com>
* Copyright 2012 Benjamin Vernoux <titanmkd@gmail.com>
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __HACKRF_CORE_H
#define __HACKRF_CORE_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
#include <stdbool.h>
/* hardware identification number */
#define BOARD_ID_JELLYBEAN 0
#define BOARD_ID_JAWBREAKER 1
#define BOARD_ID_HACKRF_ONE 2
#ifdef JELLYBEAN
#define BOARD_ID BOARD_ID_JELLYBEAN
#endif
#ifdef JAWBREAKER
#define BOARD_ID BOARD_ID_JAWBREAKER
#endif
#ifdef HACKRF_ONE
#define BOARD_ID BOARD_ID_HACKRF_ONE
#endif
/*
* SCU PinMux
*/
/* GPIO Output PinMux */
#define SCU_PINMUX_LED1 (P2_5) /* GPIO5[5] on P2_5 */
/* GPIO Input PinMux */
#define SCU_PINMUX_BOOT0 (P1_1) /* GPIO0[8] on P1_1 */
#define SCU_PINMUX_BOOT1 (P1_2) /* GPIO0[9] on P1_2 */
#define SCU_PINMUX_BOOT2 (P2_8) /* GPIO5[7] on P2_8 */
#define SCU_PINMUX_BOOT3 (P2_9) /* GPIO1[10] on P2_9 */
/* SSP1 Peripheral PinMux */
#define SCU_SSP1_MISO (P1_3) /* P1_3 */
#define SCU_SSP1_MOSI (P1_4) /* P1_4 */
#define SCU_SSP1_SCK (P1_19) /* P1_19 */
//#define SCU_SSP1_SSEL (P1_20) /* P1_20 */
/* SGPIO interface */
#define SCU_PINMUX_SGPIO0 (P0_0) /* D2 */
#define SCU_PINMUX_SGPIO1 (P0_1) /* D3 */
#define SCU_PINMUX_SGPIO2 (P1_15) /* D4 */
#define SCU_PINMUX_SGPIO3 (P1_16) /* D5 */
#define SCU_PINMUX_SGPIO4 (P2_0) /* D6 */
#define SCU_PINMUX_SGPIO5 (P2_1) /* D7 */
#define SCU_PINMUX_SGPIO6 (P2_2) /* D8 */
#define SCU_PINMUX_SGPIO7 (P1_0) /* D8 */
#define SCU_PINMUX_SGPIO8 (P1_12) /* CLK */
#define SCU_PINMUX_SGPIO9 (P1_13) /* CLK */
#define SCU_PINMUX_SGPIO10 (P1_14) /* D0 */
#define SCU_PINMUX_SGPIO11 (P1_17) /* D1 */
#define SCU_PINMUX_SGPIO12 (P1_18) /* NC */
#define SCU_PINMUX_SGPIO13 (P4_8) /* NC */
#define SCU_PINMUX_SGPIO14 (P1_6) /* NC */
#define SCU_PINMUX_SGPIO15 (P1_5) /* NC */
#define SCU_PINMUX_GPIO0 (P2_11)
/* ADF4158 */
#define SCU_ADF_TXDATA (P1_7) /* GPIO1[0] */
#define SCU_ADF_LE (P1_8) /* GPIO1[1] */
#define SCU_ADF_CE (P1_9) /* GPIO1[2] */
/* Interfaces */
#define SCU_GPIO0 (P2_11) /* GPIO1[11] */
#define SCU_GPIO1 (P2_7) /* GPIO0[7] */
#define SCU_MCP_CS (P6_5) /* GPIO3[4] */
#define SCU_MCP_UD (P6_9) /* GPIO3[5] */
/* Control lines */
#define SCU_PA_OFF (P3_1) /* GPIO5[8] */
#define SCU_MIX_ENBL (P3_2) /* GPIO5[9] */
/* ADC */
#define SCU_ADC_NOE (P1_20)
/* SPI flash */
#define SCU_SSP0_MISO (P3_6)
#define SCU_SSP0_MOSI (P3_7)
#define SCU_SSP0_SCK (P3_3)
#define SCU_SSP0_SSEL (P3_8) /* GPIO5[11] on P3_8 */
#define SCU_FLASH_HOLD (P3_4) /* GPIO1[14] on P3_4 */
#define SCU_FLASH_WP (P3_5) /* GPIO1[15] on P3_5 */
#define SCU_OTG_USBV (P2_3)
#define SCU_MCP_CS (P6_5)
#define SCU_MCP_UD (P6_9)
/*
* GPIO Pins
*/
/* GPIO Output */
#define PIN_LED1 (BIT5)
#define PORT_LED1_3 (GPIO5)
#define PORT_PA_OFF (GPIO5)
#define PIN_PA_OFF (BIT8)
#define PORT_MIX_ENBL (GPIO5)
#define PIN_MIX_ENBL (BIT9)
#define PIN_ADF_CE (BIT2)
#define PORT_ADF_CE (GPIO1)
#define PIN_ADF_LE (BIT1)
#define PORT_ADF_LE (GPIO1)
#define PIN_ADF_TXDATA (BIT0)
#define PORT_ADF_TXDATA (GPIO1)
#define PORT_ADC_NOE (GPIO0)
#define PIN_ADC_NOE (BIT15)
#define PIN_FLASH_HOLD (BIT14) /* GPIO1[14] on P3_4 */
#define PIN_FLASH_WP (BIT15) /* GPIO1[15] on P3_5 */
#define PORT_FLASH (GPIO1)
#define PIN_SSP0_SSEL (BIT11) /* GPIO5[11] on P3_8 */
#define PORT_SSP0_SSEL (GPIO5)
/* GPIO Input */
#define PIN_BOOT0 (BIT8) /* GPIO0[8] on P1_1 */
#define PIN_BOOT1 (BIT9) /* GPIO0[9] on P1_2 */
#define PIN_BOOT2 (BIT7) /* GPIO5[7] on P2_8 */
#define PIN_BOOT3 (BIT10) /* GPIO1[10] on P2_9 */
/* Read GPIO Pin */
#define GPIO_STATE(port, pin) ((GPIO_PIN(port) & (pin)) == (pin))
#define BOOT0_STATE GPIO_STATE(GPIO0, PIN_BOOT0)
#define BOOT1_STATE GPIO_STATE(GPIO0, PIN_BOOT1)
#define BOOT2_STATE GPIO_STATE(GPIO5, PIN_BOOT2)
#define BOOT3_STATE GPIO_STATE(GPIO1, PIN_BOOT3)
#define MIXER_SDATA_STATE GPIO_STATE(PORT_MIXER_SDATA, PIN_MIXER_SDATA)
#define CPLD_TDO_STATE GPIO_STATE(PORT_CPLD_TDO, PIN_CPLD_TDO)
typedef enum {
TRANSCEIVER_MODE_OFF = 0,
TRANSCEIVER_MODE_RX = 1,
TRANSCEIVER_MODE_TX = 2
} transceiver_mode_t;
void delay(uint32_t duration);
void cpu_clock_init(void);
void cpu_clock_pll1_low_speed(void);
void cpu_clock_pll1_max_speed(void);
void ssp1_init(void);
void ssp1_set_mode_16bit(void);
void ssp1_set_mode_8bit(void);
void pin_setup(void);
#ifdef HACKRF_ONE
void enable_rf_power(void);
void disable_rf_power(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* __HACKRF_CORE_H */
================================================
FILE: firmware/common/m0_bin.s.cmake
================================================
# Copyright 2013 Jared Boone <jared@sharebrained.com>
#
# This file is part of HackRF.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
.data
.section .m0_bin, "ax"
.incbin "${PROJECT_NAME}_m0.bin"
================================================
FILE: firmware/common/m0_sleep.c
================================================
/*
* Copyright 2013 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
int main() {
while(1) {
}
}
================================================
FILE: firmware/common/mcp4022.c
================================================
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include "hackrf_core.h"
#include "mcp4022.h"
static uint8_t mcp_val;
#define MCP_PORT GPIO3
#define PIN_CS BIT4
#define PIN_UD BIT5
/* Signals are inverted in hardware */
#define CS_LOW() gpio_set(MCP_PORT, PIN_CS)
#define CS_HIGH() gpio_clear(MCP_PORT, PIN_CS)
#define UD_LOW() gpio_set(MCP_PORT, PIN_UD)
#define UD_HIGH() gpio_clear(MCP_PORT, PIN_UD)
static void wait_us(uint32_t wait);
static void mcp_inc(uint8_t val);
static void mcp_dec(uint8_t val);
/* CS low time: 5us
* UD toggle frequency: 1 MHz
* UD low/high time: 500ns */
void mcp_init(void) {
/* P6_5(GPIO3[4]) = MCP_CS
* P6_9(GPIO3[5]) = MCP_UD */
/* Configure the pinmux */
scu_pinmux(SCU_MCP_CS, SCU_GPIO_NOPULL);
scu_pinmux(SCU_MCP_UD, SCU_GPIO_NOPULL);
CS_HIGH();
UD_HIGH();
/* Configures the pins as outputs */
GPIO3_DIR |= (BIT4 | BIT5);
mcp_val = 32;
}
static void wait_us(uint32_t wait) {
/* Assumes clock frequency of 204 MHz */
uint32_t i, j;
for (i = 0; i < wait; i++) {
for (j = 0; j < 1020; j++) {
__asm__("nop");
}
}
}
static void mcp_inc(uint8_t val) {
int i;
UD_HIGH(); /* Set increment mode */
CS_LOW(); /* Enable serial */
wait_us(5); /* Wait for device */
for (i=0;i<val;i++) {
UD_LOW();
wait_us(2);
UD_HIGH();
wait_us(2);
}
CS_HIGH();
UD_HIGH();
}
static void mcp_dec(uint8_t val) {
int i;
UD_LOW(); /* Set decrement mode */
CS_LOW(); /* Enable serial */
wait_us(5); /* Wait for device */
for (i=0;i<val;i++) {
UD_HIGH();
wait_us(1);
UD_LOW();
wait_us(1);
}
CS_HIGH();
UD_HIGH();
}
void mcp_set(uint8_t val) {
if (val > MCP_MAX_VALUE) {
val = MCP_MAX_VALUE;
}
int8_t diff = val-mcp_val;
if (diff > 0) {
mcp_inc(diff);
} else if (diff < 0) {
mcp_dec(diff);
}
mcp_val = val;
}
================================================
FILE: firmware/common/mcp4022.h
================================================
#ifndef _MCP4022_H
#define _MCP4022_H
#define MCP_MAX_VALUE 63
void mcp_init(void);
void mcp_set(uint8_t val);
#endif
================================================
FILE: firmware/common/rf_path.c
================================================
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/ssp.h>
#include "hackrf_core.h"
void enable_pa(void) {
gpio_set(PORT_PA_OFF, PIN_PA_OFF);
}
void disable_pa(void) {
gpio_clear(PORT_PA_OFF, PIN_PA_OFF);
}
void enable_mixer(void) {
gpio_set(PORT_MIX_ENBL, PIN_MIX_ENBL);
}
void disable_mixer(void) {
gpio_clear(PORT_MIX_ENBL, PIN_MIX_ENBL);
}
void disable_adc(void) {
gpio_set(PORT_ADC_NOE, PIN_ADC_NOE);
}
void enable_adc(void) {
gpio_clear(PORT_ADC_NOE, PIN_ADC_NOE);
}
void enable_adf4158(void) {
gpio_set(PORT_ADF_CE, PIN_ADF_CE);
}
void disable_adf4158(void) {
gpio_clear(PORT_ADF_CE, PIN_ADF_CE);
}
void rf_disable(void) {
gpio_clear(PORT_ADF_TXDATA, PIN_ADF_TXDATA);
disable_pa();
disable_mixer();
disable_adc();
disable_adf4158();
}
void rf_enable(void) {
enable_adf4158();
enable_adc();
enable_pa();
enable_mixer();
}
void adf4158_write_register(uint32_t data) {
uint16_t transfer[2] = {data >> 16, data & 0x0000FFFF};
gpio_clear(PORT_ADF_LE, PIN_ADF_LE);
ssp_transfer(SSP1_NUM, transfer[0]);
ssp_transfer(SSP1_NUM, transfer[1]);
gpio_set(PORT_ADF_LE, PIN_ADF_LE);
}
uint32_t adf4158_read_register(void) {
uint32_t read = 0;
gpio_set(PORT_ADF_LE, PIN_ADF_LE);
read = (uint32_t)((uint16_t)ssp_transfer(SSP1_NUM, 0xFFFF) << 16);
read |= (uint16_t)ssp_transfer(SSP1_NUM, 0xFFFF);
gpio_set(PORT_ADF_LE, PIN_ADF_LE);
return read;
}
================================================
FILE: firmware/common/rf_path.h
================================================
#ifndef _RF_PATH_H
#define _RF_PATH_H
void enable_adc(void);
void disable_adc(void);
void enable_pa(void);
void disable_pa(void);
void enable_mixer(void);
void disable_mixer(void);
void enable_adf4158(void);
void disable_adf4158(void);
void rf_disable(void);
void rf_enable(void);
void adf4158_write_register(uint32_t data);
uint32_t adf4158_read_register(void);
#endif
================================================
FILE: firmware/common/rom_iap.c
================================================
/*
* Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "hackrf_core.h"
#include <stdint.h>
#include "rom_iap.h"
#include "w25q80bv.h"
#define ROM_IAP_ADDR (0x10400100)
#define ROM_IAP_UNDEF_ADDR (0x12345678)
#define ROM_OTP_PART_ID_ADDR (0x40045000)
typedef void (* IAP_t)(uint32_t [],uint32_t[]);
typedef struct {
const IAP_t IAP; /* If equal to 0x12345678 IAP not implemented */
/* Other TBD */
} *pENTRY_ROM_API_t;
#define pROM_API ((pENTRY_ROM_API_t)ROM_IAP_ADDR)
/*
See Errata sheet ES_LPC43X0_A.pdf (LPC4350/30/20/10 Rev A)
3.5 IAP.1: In-Application Programming API not present on flashless parts
Introduction:
The LPC43x0 microcontrollers contain an APIfor In-Application Programming of flash
memory. This API also allows identification of the part.
Problem:
On the LPC43x0 microcontrollers, the IAP API is not present. The ISP interface is present
which allows the part to be identified externally (via the UART) but part identification is not
possible internally using the IAP call because it is not implemented.
The first word of the Part ID can be read directly from OTP at 0x40045000. The second word of the Part ID is always
'0' on flashless parts. */
bool iap_is_implemented(void)
{
bool res;
if( *((uint32_t*)ROM_IAP_ADDR) != ROM_IAP_UNDEF_ADDR )
{
res = true;
}else
{
res = false;
}
return res;
}
isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res)
{
uint32_t* p_u32_data;
if( iap_is_implemented() )
{
pROM_API->IAP( (uint32_t*)&iap_cmd_res->cmd_param, (uint32_t*)&iap_cmd_res->status_res);
}else
{
/*
Alternative way to retrieve Part Id on MCU with no IAP
Read Serial No => Read Unique ID in SPIFI (only compatible with W25Q80BV
*/
w25q80bv_setup();
switch(iap_cmd_res->cmd_param.command_code)
{
case IAP_CMD_READ_PART_ID_NO:
p_u32_data = (uint32_t*)ROM_OTP_PART_ID_ADDR;
iap_cmd_res->status_res.iap_result[0] = p_u32_data[0];
iap_cmd_res->status_res.iap_result[1] = p_u32_data[1];
iap_cmd_res->status_res.status_ret = CMD_SUCCESS;
break;
case IAP_CMD_READ_SERIAL_NO:
/* Only 64bits used */
iap_cmd_res->status_res.iap_result[0] = 0;
iap_cmd_res->status_res.iap_result[1] = 0;
w25q80bv_get_unique_id( (w25q80bv_unique_id_t*)&iap_cmd_res->status_res.iap_result[2] );
iap_cmd_res->status_res.status_ret = CMD_SUCCESS;
break;
default:
iap_cmd_res->status_res.status_ret = ERROR_IAP_NOT_IMPLEMENTED;
break;
}
}
return iap_cmd_res->status_res.status_ret;
}
================================================
FILE: firmware/common/rom_iap.h
================================================
/*
* Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __ROM_IAP__
#define __ROM_IAP__
#include <stdint.h>
typedef enum
{
/* TODO define other commands */
IAP_CMD_INIT_IAP = 49,
/* Command Init IAP
Input Command code: 49 (decimal)
Return Code CMD_SUCCESS
Result None
Description Initializes and prepares the flash for erase and write operations.
Stack usage 88 B */
IAP_CMD_READ_PART_ID_NO = 54,
/* Read part identification number
Command Read part identification number
Input Command code: 54 (decimal)
Parameters:None
Return Code CMD_SUCCESS |
Result Result0:Part Identification Number.
Result1:Part Identification Number.
Description This command is used to read the part identification number. See Table 1082
LPC43xx part identification numbers.
The command returns two words: word0 followed by word1. Word 0 corresponds
to the part id and word1 indicates the flash configuration or contains 0x0 for
flashless parts.
Stack usage 8 B */
IAP_CMD_READ_SERIAL_NO = 58
/* Read device serial number
Input Command code: 58 (decimal)
Parameters: None
Return Code CMD_SUCCESS
Result Result0:First 32-bit word of Device Identification Number (at the lowest address)
Result1:Second 32-bit word of Device Identification Number
Result2:Third 32-bit word of Device Identification Number
Result3:Fourth 32-bit word of Device Identification Number
Description This command is used to read the device identification number. The serial number
may be used to uniquely identify a single unit among all LPC43xx devices.
Stack usage 8 B */
} iap_cmd_code_t;
/* ISP/IAP Return Code */
typedef enum
{
CMD_SUCCESS = 0x00000000, /* CMD_SUCCESS Command is executed successfully. Sent by ISP handler only when command given by the host has been completely and successfully executed. */
INVALID_COMMAND = 0x00000001, /* Invalid command. */
SRC_ADDR_ERROR = 0x00000002, /* Source address is not on word boundary. */
DST_ADDR_ERROR = 0x00000003, /* Destination address not on word or 256 byte boundary. */
SRC_ADDR_NOT_MAPPED = 0x00000004, /* Source address is not mapped in the memory map. Count value is taken into consideration where applicable. */
DST_ADDR_NOT_MAPPED = 0x00000005, /* Destination address is not mapped in the memory map. Count value is taken into consideration where applicable.*/
COUNT_ERROR = 0x00000006, /* Byte count is not multiple of 4 or is not a permitted value. */
INVALID_SECTOR = 0x00000007, /* Sector number is invalid or end sector number is greater than start sector number. */
SECTOR_NOT_BLANK = 0x00000008, /* Sector is not blank. */
SECTOR_NOT_PREP_WRITE_OP = 0x00000009, /* Command to prepare sector for write operation was not executed. */
COMPARE_ERROR = 0x0000000A, /* Source and destination data not equal. */
BUSY = 0x0000000B, /* Flash programming hardware interface is busy. */
PARAM_ERROR = 0x0000000C, /* Insufficient number of parameters or invalid parameter. */
ADDR_ERROR = 0x0000000D, /* Address is not on word boundary. */
ADDR_NOT_MAPPED = 0x0000000E, /* Address is not mapped in the memory map. Count value is taken in to consideration where applicable. */
CMD_LOCKED = 0x0000000F, /* Command is locked. */
INVALID_CODE = 0x00000010, /* Unlock code is invalid. */
INVALID_BAUD_RATE = 0x00000011, /* Invalid baud rate setting. */
INVALID_STOP_BIT = 0x00000012, /* Invalid stop bit setting. */
CODE_READ_PROTECTION_ENABLED = 0x00000013, /* Code read protection enabled. */
INVALID_FLASH_UNIT = 0x00000014, /* Invalid flash unit. */
USER_CODE_CHECKSUM = 0x00000015,
ERROR_SETTING_ACTIVE_PARTITION = 0x00000016,
/* Special Error */
ERROR_IAP_NOT_IMPLEMENTED = 0x00000100 /* IAP is not implemented in this part */
} isp_iap_ret_code_t;
typedef struct
{
/* Input Command/Param */
struct
{
iap_cmd_code_t command_code;
uint32_t iap_param[5];
} cmd_param;
/* Output Status/Result */
struct
{
isp_iap_ret_code_t status_ret;
uint32_t iap_result[4];
} status_res;
} iap_cmd_res_t;
/* Check if IAP is implemented */
bool iap_is_implemented(void);
isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res);
#endif//__ROM_IAP__
================================================
FILE: firmware/common/sgpio.c
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
* Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/sgpio.h>
#include <hackrf_core.h>
#include <sgpio.h>
static bool sgpio_slice_mode_multislice = true;
void sgpio_configure_pin_functions() {
scu_pinmux(SCU_PINMUX_SGPIO0, SCU_GPIO_FAST | SCU_CONF_FUNCTION3);
scu_pinmux(SCU_PINMUX_SGPIO1, SCU_GPIO_FAST | SCU_CONF_FUNCTION3);
scu_pinmux(SCU_PINMUX_SGPIO2, SCU_GPIO_FAST | SCU_CONF_FUNCTION2);
scu_pinmux(SCU_PINMUX_SGPIO3, SCU_GPIO_FAST | SCU_CONF_FUNCTION2);
scu_pinmux(SCU_PINMUX_SGPIO4, SCU_GPIO_FAST | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_SGPIO5, SCU_GPIO_FAST | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_SGPIO6, SCU_GPIO_FAST | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_SGPIO7, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
scu_pinmux(SCU_PINMUX_SGPIO8, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
scu_pinmux(SCU_PINMUX_SGPIO9, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
scu_pinmux(SCU_PINMUX_SGPIO10, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
scu_pinmux(SCU_PINMUX_SGPIO11, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
/*
scu_pinmux(SCU_PINMUX_SGPIO12, SCU_GPIO_FAST | SCU_CONF_FUNCTION0);
scu_pinmux(SCU_PINMUX_SGPIO13, SCU_GPIO_FAST | SCU_CONF_FUNCTION4);
*/
// Same as SCU_GPIO_FAST, but pullup is enabled
scu_pinmux(SCU_PINMUX_SGPIO14, (SCU_CONF_EHS_FAST | SCU_CONF_EZI_EN_IN_BUFFER | SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) | SCU_CONF_FUNCTION6);
/*
scu_pinmux(SCU_PINMUX_SGPIO15, SCU_GPIO_FAST | SCU_CONF_FUNCTION6);
*/
//GPIO_DIR(GPIO0) |= GPIOPIN13;
//GPIO_DIR(GPIO5) |= GPIOPIN14 | GPIOPIN13 | GPIOPIN12;
}
void sgpio_test_interface() {
const uint_fast8_t out_pin = 9; // Output
SGPIO_GPIO_OENREG = 0; // All inputs for the moment.
// Disable all counters during configuration
SGPIO_CTRL_ENABLE = 0;
// Make all SGPIO controlled by SGPIO's "GPIO" registers
for (uint_fast8_t i = 0; i < 16; i++) {
SGPIO_OUT_MUX_CFG(i) =
SGPIO_OUT_MUX_CFG_P_OE_CFG(0)
| SGPIO_OUT_MUX_CFG_P_OUT_CFG(4);
}
// Set SGPIO output values.
SGPIO_GPIO_OUTREG =
(1L << out_pin);
// Enable SGPIO pin outputs.
SGPIO_GPIO_OENREG =
(1L << out_pin);
while (1) {
SGPIO_GPIO_OUTREG ^= (1L << out_pin);
}
}
void sgpio_set_slice_mode(
const bool multi_slice
) {
sgpio_slice_mode_multislice = multi_slice;
}
/*
SGPIO0 to 7 = DAC/ADC data bits 0 to 7 (Nota: DAC is 10bits but only bit9 to bit2 are used bit1 & 0 are forced to 0 by CPLD)
ADC=> CLK x 2=CLKx2 with CLKx2(0)rising=D0Q, CLKx2(1)rising=D1I (corresponds to CLK(0)falling+tD0Q=>D0Q, CLK(1)rising+tDOI=>D1I, CLK(1)falling+tD0Q=>D1Q, CLK(1)rising+tDOI=>D2I ...)
tDOI(CLK Rise to I-ADC Channel-I Output Data Valid)=7.4 to 9ns, tD0Q(CLK Fall to Q-ADC Channel-Q Output Data Valid)=6.9 to 9ns
DAC=> CLK x 2=CLKx2 with CLKx2(0)rising=Q:N-2, CLKx2(1)rising=I:N-1(corresponds to CLK(0)rising=>Q:N-2, CLK(0)falling I:N-1, CLK(1)rising=>Q:N-1, CLK(1)falling I:N ...)
tDSI(I-DAC Data to CLK Fall Setup Time)=min 10ns, tDSQ(Q-DAC Data to CLK Rise Setup Time)=min 10ns
SGPIO8 Clock Input (External Clock)
*/
void sgpio_configure(void) {
// Disable all counters during configuration
SGPIO_CTRL_ENABLE = 0;
// Set SGPIO output values.
const sgpio_direction_t direction = SGPIO_DIRECTION_RX;
SGPIO_GPIO_OUTREG =
(1L << 9) // SGPIO9 clock out
;
// Enable SGPIO pin outputs.
const uint_fast16_t sgpio_gpio_data_direction = (0x00 << 0);
SGPIO_GPIO_OENREG =
(0L << 14) // GPDMA burst request SGPIO14 active
| (0L << 11) // direction output SGPIO11 active
| (0L << 10) // disable output SGPIO10 active
| (1L << 9) // Clock output SGPIO9
| (0L << 8) // clock input SGPIO8 (output i is tri-stated)
| sgpio_gpio_data_direction // 0xFF=Output all SGPIO High(TX mode), 0x00=Output all SPGIO Low(RX mode)
;
SGPIO_OUT_MUX_CFG( 8) = // SGPIO8: Input: clock
SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */
| SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */
;
SGPIO_OUT_MUX_CFG( 9) = // SGPIO9: Clock output
SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */
| SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */
;
SGPIO_OUT_MUX_CFG( 14) = // SGPIO14: ADF4158 MUXOUT input
SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */
| SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */
;
const uint_fast8_t output_multiplexing_mode =
sgpio_slice_mode_multislice ? 11 : 9;
/* SGPIO0 to SGPIO7 */
for(uint_fast8_t i=0; i<8; i++) {
// SGPIO pin 0 outputs slice A bit "i".
SGPIO_OUT_MUX_CFG(i) =
SGPIO_OUT_MUX_CFG_P_OE_CFG(0)
| SGPIO_OUT_MUX_CFG_P_OUT_CFG(output_multiplexing_mode) /* 11/0xB=dout_doutm8c (8-bit mode 8c)(multislice L0/7, N0/7), 9=dout_doutm8a (8-bit mode 8a)(A0/7,B0/7) */
;
}
const uint_fast8_t slice_indices[] = {
SGPIO_SLICE_A,
SGPIO_SLICE_I,
SGPIO_SLICE_E,
SGPIO_SLICE_J,
SGPIO_SLICE_C,
SGPIO_SLICE_K,
SGPIO_SLICE_F,
SGPIO_SLICE_L,
};
const uint_fast8_t slice_gpdma = SGPIO_SLICE_H;
const uint_fast8_t pos = sgpio_slice_mode_multislice ? 0x1f : 0x03;
const bool single_slice = !sgpio_slice_mode_multislice;
const uint_fast8_t slice_count = sgpio_slice_mode_multislice ? 8 : 1;
const uint_fast8_t clk_capture_mode = (direction == SGPIO_DIRECTION_TX) ? 0 : 1;
uint32_t slice_enable_mask = 0;
/* Configure Slice A, I, E, J, C, K, F, L (sgpio_slice_mode_multislice mode) */
for(uint_fast8_t i=0; i<slice_count; i++)
{
const uint_fast8_t slice_index = slice_indices[i];
const bool input_slice = (i == 0) && (direction != SGPIO_DIRECTION_TX); /* Only for slice0/A and RX mode set input_slice to 1 */
const uint_fast8_t concat_order = (input_slice || single_slice) ? 0 : 3; /* 0x0=Self-loop(slice0/A RX mode), 0x3=8 slices */
const uint_fast8_t concat_enable = (input_slice || single_slice) ? 0 : 1; /* 0x0=External data pin(slice0/A RX mode), 0x1=Concatenate data */
SGPIO_MUX_CFG(slice_index) =
SGPIO_MUX_CFG_CONCAT_ORDER(concat_order)
| SGPIO_MUX_CFG_CONCAT_ENABLE(concat_enable)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(slice_index) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(3) /* 0x3=Shift 1 byte(8bits) per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(clk_capture_mode) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(slice_index) = 0; // External clock, don't care
SGPIO_COUNT(slice_index) = 0; // External clock, don't care
SGPIO_POS(slice_index) =
SGPIO_POS_POS_RESET(pos)
| SGPIO_POS_POS(pos)
;
SGPIO_REG(slice_index) = 0x00000000; // Primary output data register
SGPIO_REG_SS(slice_index) = 0x00000000; // Shadow output data register
slice_enable_mask |= (1 << slice_index);
}
if( sgpio_slice_mode_multislice == false ) {
SGPIO_MUX_CFG(slice_gpdma) =
SGPIO_MUX_CFG_CONCAT_ORDER(0) /* Self-loop */
| SGPIO_MUX_CFG_CONCAT_ENABLE(1)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(3) /* External SGPIO */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(slice_gpdma) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(clk_capture_mode) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(slice_gpdma) = 0; // External clock, don't care
SGPIO_COUNT(slice_gpdma) = 0; // External clock, don't care
SGPIO_POS(slice_gpdma) =
SGPIO_POS_POS_RESET(0x1f)
| SGPIO_POS_POS(0x1f)
;
SGPIO_REG(slice_gpdma) = 0x11111111; // Primary output data register, LSB -> out
SGPIO_REG_SS(slice_gpdma) = 0x11111111; // Shadow output data register, LSB -> out1
slice_enable_mask |= (1 << slice_gpdma);
}
// 10.2 MHz
sgpio_configure_clock(0x09, 0x5555);
// SGPIO14
SGPIO_MUX_CFG(SGPIO_SLICE_H) =
SGPIO_MUX_CFG_CONCAT_ORDER(0)
| SGPIO_MUX_CFG_CONCAT_ENABLE(0)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_H) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(SGPIO_SLICE_H) = 0x00;
SGPIO_COUNT(SGPIO_SLICE_H) = 0x00;
SGPIO_POS(SGPIO_SLICE_H) =
SGPIO_POS_POS_RESET(0x1f)
| SGPIO_POS_POS(0x1f)
;
SGPIO_REG(SGPIO_SLICE_H) = 0; // Primary output data register, LSB -> out
SGPIO_REG_SS(SGPIO_SLICE_H) = 0; // Shadow output data register, LSB -> out1
slice_enable_mask |= (1 << SGPIO_SLICE_H);
// SGPIO10/SLICE G/D0
SGPIO_MUX_CFG(SGPIO_SLICE_G) =
SGPIO_MUX_CFG_CONCAT_ORDER(0)
| SGPIO_MUX_CFG_CONCAT_ENABLE(0)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_G) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(SGPIO_SLICE_G) = 0x00;
SGPIO_COUNT(SGPIO_SLICE_G) = 0x00;
SGPIO_POS(SGPIO_SLICE_G) =
SGPIO_POS_POS_RESET(0x1f)
| SGPIO_POS_POS(0x1f)
;
SGPIO_REG(SGPIO_SLICE_G) = 0; // Primary output data register, LSB -> out
SGPIO_REG_SS(SGPIO_SLICE_G) = 0; // Shadow output data register, LSB -> out1
slice_enable_mask |= (1 << SGPIO_SLICE_G);
// SGPIO11/SLICE N/D1
SGPIO_MUX_CFG(SGPIO_SLICE_N) =
SGPIO_MUX_CFG_CONCAT_ORDER(0)
| SGPIO_MUX_CFG_CONCAT_ENABLE(0)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_N) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(SGPIO_SLICE_N) = 0x00;
SGPIO_COUNT(SGPIO_SLICE_N) = 0x00;
SGPIO_POS(SGPIO_SLICE_N) =
SGPIO_POS_POS_RESET(0x1f)
| SGPIO_POS_POS(0x1f)
;
SGPIO_REG(SGPIO_SLICE_N) = 0; // Primary output data register, LSB -> out
SGPIO_REG_SS(SGPIO_SLICE_N) = 0; // Shadow output data register, LSB -> out1
slice_enable_mask |= (1 << SGPIO_SLICE_N);
// Start SGPIO operation by enabling slice clocks.
SGPIO_CTRL_ENABLE = slice_enable_mask;
}
void sgpio_configure_clock(uint16_t preset, uint16_t reg) {
// reg = Output data register, 0xAAAA or 0x5555 recommended
// preset = clock divider value
// Output clock = 204 MHz /((Preset+1)*2)
// Set SGPIO9(M) as output clock
SGPIO_MUX_CFG(SGPIO_SLICE_M) =
SGPIO_MUX_CFG_CONCAT_ORDER(0)
| SGPIO_MUX_CFG_CONCAT_ENABLE(1)
| SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(0) /* Select qualifier pin SGPIO8(0x0) */
| SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */
| SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */
| SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */
| SGPIO_MUX_CFG_EXT_CLK_ENABLE(0) /* External clock signal(pin) selected */
;
SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_M) =
SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */
| SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */
| SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */
| SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */
| SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(0) /* 0x0=Use counter clock */
| SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */
| SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */
;
SGPIO_PRESET(SGPIO_SLICE_M) = preset;
SGPIO_COUNT(SGPIO_SLICE_M) = 0x00;
SGPIO_POS(SGPIO_SLICE_M) =
SGPIO_POS_POS_RESET(0x1f)
| SGPIO_POS_POS(0x1f)
;
uint32_t reg32 = (reg<<16)|reg;
SGPIO_REG(SGPIO_SLICE_M) = reg32; // Primary output data register, LSB -> out
SGPIO_REG_SS(SGPIO_SLICE_M) = reg32; // Shadow output data register, LSB -> out1
}
================================================
FILE: firmware/common/sgpio.h
================================================
/*
* Copyright 2012 Jared Boone <jared@sharebrained.com>
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __SGPIO_H__
#define __SGPIO_H__
#include <hackrf_core.h>
typedef enum {
SGPIO_DIRECTION_RX,
SGPIO_DIRECTION_TX,
} sgpio_direction_t;
void sgpio_configure_pin_functions();
void sgpio_test_interface();
void sgpio_set_slice_mode(
const bool multi_slice
);
void sgpio_configure(void);
void sgpio_configure_clock(uint16_t preset, uint16_t reg);
#endif//__SGPIO_H__
================================================
FILE: firmware/common/streaming.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <streaming.h>
#include <libopencm3/lpc43xx/m4/nvic.h>
#include <libopencm3/lpc43xx/sgpio.h>
#include <sgpio.h>
void baseband_streaming_enable() {
nvic_set_priority(NVIC_SGPIO_IRQ, 0);
nvic_enable_irq(NVIC_SGPIO_IRQ);
SGPIO_SET_EN_1 = (1 << SGPIO_SLICE_A);
SGPIO_CTRL_ENABLE |= (1 << SGPIO_SLICE_M);
}
void baseband_streaming_disable() {
SGPIO_CTRL_ENABLE &= ~(1 << SGPIO_SLICE_M);
nvic_disable_irq(NVIC_SGPIO_IRQ);
}
================================================
FILE: firmware/common/streaming.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __STREAMING_H__
#define __STREAMING_H__
void baseband_streaming_enable();
void baseband_streaming_disable();
#endif/*__STREAMING_H__*/
================================================
FILE: firmware/common/usb.c
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include <stdbool.h>
#include "usb.h"
#include "usb_type.h"
#include "usb_queue.h"
#include "usb_standard_request.h"
#include <libopencm3/lpc43xx/creg.h>
#include <libopencm3/lpc43xx/m4/nvic.h>
#include <libopencm3/lpc43xx/rgu.h>
#include <libopencm3/lpc43xx/usb.h>
usb_device_t* usb_device_usb0 = 0;
usb_queue_head_t usb_qh[12] ATTR_ALIGNED(2048);
#define USB_QH_INDEX(endpoint_address) (((endpoint_address & 0xF) * 2) + ((endpoint_address >> 7) & 1))
usb_queue_head_t* usb_queue_head(
const uint_fast8_t endpoint_address
) {
return &usb_qh[USB_QH_INDEX(endpoint_address)];
}
static usb_endpoint_t* usb_endpoint_from_address(
const uint_fast8_t endpoint_address
) {
return (usb_endpoint_t*)usb_queue_head(endpoint_address)->_reserved_0;
}
static uint_fast8_t usb_endpoint_address(
const usb_transfer_direction_t direction,
const uint_fast8_t number
) {
return ((direction == USB_TRANSFER_DIRECTION_IN) ? 0x80 : 0x00) + number;
}
static bool usb_endpoint_is_in(const uint_fast8_t endpoint_address) {
return (endpoint_address & 0x80) ? true : false;
}
static uint_fast8_t usb_endpoint_number(const uint_fast8_t endpoint_address) {
return (endpoint_address & 0xF);
}
void usb_peripheral_reset() {
RESET_CTRL0 = RESET_CTRL0_USB0_RST;
RESET_CTRL0 = 0;
while( (RESET_ACTIVE_STATUS0 & RESET_CTRL0_USB0_RST) == 0 );
}
static void usb_phy_enable() {
CREG_CREG0 &= ~CREG_CREG0_USB0PHY;
}
static void usb_clear_pending_interrupts(const uint32_t mask) {
USB0_ENDPTNAK = mask;
USB0_ENDPTNAKEN = mask;
USB0_USBSTS_D = mask;
USB0_ENDPTSETUPSTAT = USB0_ENDPTSETUPSTAT & mask;
USB0_ENDPTCOMPLETE = USB0_ENDPTCOMPLETE & mask;
}
static void usb_clear_all_pending_interrupts() {
usb_clear_pending_interrupts(0xFFFFFFFF);
}
static void usb_wait_for_endpoint_priming_to_finish(const uint32_t mask) {
// Wait until controller has parsed new transfer descriptors and prepared
// receive buffers.
while( USB0_ENDPTPRIME & mask );
}
static void usb_flush_endpoints(const uint32_t mask) {
// Clear any primed buffers. If a packet is in progress, that transfer
// will continue until completion.
USB0_ENDPTFLUSH = mask;
}
static void usb_wait_for_endpoint_flushing_to_finish(const uint32_t mask) {
// Wait until controller has flushed all endpoints / cleared any primed
// buffers.
while( USB0_ENDPTFLUSH & mask );
}
static void usb_flush_primed_endpoints(const uint32_t mask) {
usb_wait_for_endpoint_priming_to_finish(mask);
usb_flush_endpoints(mask);
usb_wait_for_endpoint_flushing_to_finish(mask);
}
static void usb_flush_all_primed_endpoints() {
usb_flush_primed_endpoints(0xFFFFFFFF);
}
static void usb_endpoint_set_type(
const usb_endpoint_t* const endpoint,
const usb_transfer_type_t transfer_type
) {
// NOTE: UM10503 section 23.6.24 "Endpoint 1 to 5 control registers" says
// that the disabled side of an endpoint must be set to a non-control type
// (e.g. bulk, interrupt, or iso).
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
USB0_ENDPTCTRL(endpoint_number)
= ( USB0_ENDPTCTRL(endpoint_number)
& ~(USB0_ENDPTCTRL_TXT1_0_MASK | USB0_ENDPTCTRL_RXT_MASK)
)
| ( USB0_ENDPTCTRL_TXT1_0(transfer_type)
| USB0_ENDPTCTRL_RXT(transfer_type)
);
}
static void usb_endpoint_enable(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_TXE | USB0_ENDPTCTRL_TXR);
} else {
USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_RXE | USB0_ENDPTCTRL_RXR);
}
}
static void usb_endpoint_clear_pending_interrupts(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
usb_clear_pending_interrupts(USB0_ENDPTCOMPLETE_ETCE(1 << endpoint_number));
} else {
usb_clear_pending_interrupts(USB0_ENDPTCOMPLETE_ERCE(1 << endpoint_number));
}
}
void usb_endpoint_disable(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
USB0_ENDPTCTRL(endpoint_number) &= ~(USB0_ENDPTCTRL_TXE);
} else {
USB0_ENDPTCTRL(endpoint_number) &= ~(USB0_ENDPTCTRL_RXE);
}
usb_queue_flush_endpoint(endpoint);
usb_endpoint_clear_pending_interrupts(endpoint);
usb_endpoint_flush(endpoint);
}
void usb_endpoint_prime(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const first_td
) {
usb_queue_head_t* const qh = usb_queue_head(endpoint->address);
qh->next_dtd_pointer = first_td;
qh->total_bytes
&= ~( USB_TD_DTD_TOKEN_STATUS_ACTIVE
| USB_TD_DTD_TOKEN_STATUS_HALTED
)
;
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
USB0_ENDPTPRIME = USB0_ENDPTPRIME_PETB(1 << endpoint_number);
} else {
USB0_ENDPTPRIME = USB0_ENDPTPRIME_PERB(1 << endpoint_number);
}
}
static bool usb_endpoint_is_priming(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
return USB0_ENDPTPRIME & USB0_ENDPTPRIME_PETB(1 << endpoint_number);
} else {
return USB0_ENDPTPRIME & USB0_ENDPTPRIME_PERB(1 << endpoint_number);
}
}
// Schedule an already filled-in transfer descriptor for execution on
// the given endpoint, waiting until the endpoint has finished.
void usb_endpoint_schedule_wait(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const td
) {
// Ensure that endpoint is ready to be primed.
// It may have been flushed due to an aborted transaction.
// TODO: This should be preceded by a flush?
while( usb_endpoint_is_ready(endpoint) );
td->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE;
usb_endpoint_prime(endpoint, td);
}
// Schedule an already filled-in transfer descriptor for execution on
// the given endpoint, appending to the end of the endpoint's queue if
// there are pending TDs. Note that this requires that one knows the
// tail of the endpoint's TD queue. Moreover, the user is responsible
// for setting the TERMINATE bit of next_dtd_pointer if needed.
void usb_endpoint_schedule_append(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const tail_td,
usb_transfer_descriptor_t* const new_td
) {
bool done;
tail_td->next_dtd_pointer = new_td;
if (usb_endpoint_is_priming(endpoint)) {
return;
}
do {
USB0_USBCMD_D |= USB0_USBCMD_D_ATDTW;
done = usb_endpoint_is_ready(endpoint);
} while (!(USB0_USBCMD_D & USB0_USBCMD_D_ATDTW));
USB0_USBCMD_D &= ~USB0_USBCMD_D_ATDTW;
if(!done) {
usb_endpoint_prime(endpoint, new_td);
}
}
void usb_endpoint_flush(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
usb_queue_flush_endpoint(endpoint);
if( usb_endpoint_is_in(endpoint->address) ) {
usb_flush_primed_endpoints(USB0_ENDPTFLUSH_FETB(1 << endpoint_number));
} else {
usb_flush_primed_endpoints(USB0_ENDPTFLUSH_FERB(1 << endpoint_number));
}
}
/*
static bool usb_endpoint_is_flushing(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
return USB0_ENDPTFLUSH & USB0_ENDPTFLUSH_FETB(1 << endpoint_number);
} else {
return USB0_ENDPTFLUSH & USB0_ENDPTFLUSH_FERB(1 << endpoint_number);
}
}
*/
bool usb_endpoint_is_ready(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
return USB0_ENDPTSTAT & USB0_ENDPTSTAT_ETBR(1 << endpoint_number);
} else {
return USB0_ENDPTSTAT & USB0_ENDPTSTAT_ERBR(1 << endpoint_number);
}
}
bool usb_endpoint_is_complete(
const usb_endpoint_t* const endpoint
) {
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
if( usb_endpoint_is_in(endpoint->address) ) {
return USB0_ENDPTCOMPLETE & USB0_ENDPTCOMPLETE_ETCE(1 << endpoint_number);
} else {
return USB0_ENDPTCOMPLETE & USB0_ENDPTCOMPLETE_ERCE(1 << endpoint_number);
}
}
void usb_endpoint_stall(
const usb_endpoint_t* const endpoint
) {
// Endpoint is to be stalled as a pair -- both OUT and IN.
// See UM10503 section 23.10.5.2 "Stalling"
const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address);
USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_RXS | USB0_ENDPTCTRL_TXS);
// TODO: Also need to reset data toggle in both directions?
}
static void usb_controller_run() {
USB0_USBCMD_D |= USB0_USBCMD_D_RS;
}
static void usb_controller_stop() {
USB0_USBCMD_D &= ~USB0_USBCMD_D_RS;
}
static uint_fast8_t usb_controller_is_resetting() {
return (USB0_USBCMD_D & USB0_USBCMD_D_RST) != 0;
}
static void usb_controller_set_device_mode() {
// Set USB0 peripheral mode
USB0_USBMODE_D = USB0_USBMODE_D_CM1_0(2);
// Set device-related OTG flags
// OTG termination: controls pull-down on USB_DM
// VBUS_Discharge: VBUS discharges through resistor
USB0_OTGSC = USB0_OTGSC_OT | USB0_OTGSC_VD | USB0_OTGSC_VC;
}
usb_speed_t usb_speed(
const usb_device_t* const device
) {
if( device == usb_device_usb0 ) {
switch( USB0_PORTSC1_D & USB0_PORTSC1_D_PSPD_MASK ) {
case USB0_PORTSC1_D_PSPD(0):
return USB_SPEED_FULL;
case USB0_PORTSC1_D_PSPD(2):
return USB_SPEED_HIGH;
default:
// TODO: What to do/return here? Is this even possible?
return USB_SPEED_FULL;
}
} else {
// TODO: This should not be possible with a more class-like
// implementation.
return USB_SPEED_FULL;
}
}
static void usb_clear_status(const uint32_t status) {
USB0_USBSTS_D = status;
}
static uint32_t usb_get_status() {
// Mask status flags with enabled flag interrupts.
const uint32_t status = USB0_USBSTS_D & USB0_USBINTR_D;
// Clear flags that were just read, leaving alone any flags that
// were just set (after the read). It's important to read and
// reset flags atomically! :-)
usb_clear_status(status);
return status;
}
static void usb_clear_endpoint_setup_status(const uint32_t endpoint_setup_status) {
USB0_ENDPTSETUPSTAT = endpoint_setup_status;
}
static uint32_t usb_get_endpoint_setup_status() {
return USB0_ENDPTSETUPSTAT;
}
static void usb_clear_endpoint_complete(const uint32_t endpoint_complete) {
USB0_ENDPTCOMPLETE = endpoint_complete;
}
static uint32_t usb_get_endpoint_complete() {
return USB0_ENDPTCOMPLETE;
}
static void usb_disable_all_endpoints() {
// Endpoint 0 is always enabled. TODO: So why set ENDPTCTRL0?
USB0_ENDPTCTRL0 &= ~(USB0_ENDPTCTRL0_RXE | USB0_ENDPTCTRL0_TXE);
USB0_ENDPTCTRL1 &= ~(USB0_ENDPTCTRL1_RXE | USB0_ENDPTCTRL1_TXE);
USB0_ENDPTCTRL2 &= ~(USB0_ENDPTCTRL2_RXE | USB0_ENDPTCTRL2_TXE);
USB0_ENDPTCTRL3 &= ~(USB0_ENDPTCTRL3_RXE | USB0_ENDPTCTRL3_TXE);
USB0_ENDPTCTRL4 &= ~(USB0_ENDPTCTRL4_RXE | USB0_ENDPTCTRL4_TXE);
USB0_ENDPTCTRL5 &= ~(USB0_ENDPTCTRL5_RXE | USB0_ENDPTCTRL5_TXE);
}
void usb_set_address_immediate(
const usb_device_t* const device,
const uint_fast8_t address
) {
if( device == usb_device_usb0 ) {
USB0_DEVICEADDR = USB0_DEVICEADDR_USBADR(address);
}
}
void usb_set_address_deferred(
const usb_device_t* const device,
const uint_fast8_t address
) {
if( device == usb_device_usb0 ) {
USB0_DEVICEADDR
= USB0_DEVICEADDR_USBADR(address)
| USB0_DEVICEADDR_USBADRA
;
}
}
static void usb_reset_all_endpoints() {
usb_disable_all_endpoints();
usb_clear_all_pending_interrupts();
usb_flush_all_primed_endpoints();
}
static void usb_controller_reset() {
// TODO: Good to disable some USB interrupts to avoid priming new
// new endpoints before the controller is reset?
usb_reset_all_endpoints();
usb_controller_stop();
// Reset controller. Resets internal pipelines, timers, counters, state
// machines to initial values. Not recommended when device is in attached
// state -- effect on attached host is undefined. Detach first by flushing
// all primed endpoints and stopping controller.
USB0_USBCMD_D = USB0_USBCMD_D_RST;
while( usb_controller_is_resetting() );
}
static void usb_bus_reset(usb_device_t* const device) {
// According to UM10503 v1.4 section 23.10.3 "Bus reset":
usb_reset_all_endpoints();
usb_set_address_immediate(device, 0);
usb_set_configuration(device, 0);
// TODO: Enable endpoint 0, which might not actually be necessary,
// as the datasheet claims it can't be disabled.
//wait_ms(3);
//
//if( USB0_PORTSC1 & USB0_PORTSC1_PR ) {
// // Port still is in the reset state.
//} else {
// usb_hardware_reset();
//}
}
static void usb_interrupt_enable(
usb_device_t* const device
) {
if( device == usb_device_usb0 ) {
nvic_enable_irq(NVIC_USB0_IRQ);
}
}
void usb_device_init(
const uint_fast8_t device_ordinal,
usb_device_t* const device
) {
if( device_ordinal == 0 ) {
usb_device_usb0 = device;
usb_phy_enable();
usb_controller_reset();
usb_controller_set_device_mode();
// Set interrupt threshold interval to 0
USB0_USBCMD_D &= ~USB0_USBCMD_D_ITC_MASK;
// Configure endpoint list address
USB0_ENDPOINTLISTADDR = (uint32_t)usb_qh;
// Enable interrupts
USB0_USBINTR_D =
USB0_USBINTR_D_UE
| USB0_USBINTR_D_UEE
| USB0_USBINTR_D_PCE
| USB0_USBINTR_D_URE
//| USB0_USBINTR_D_SRE
| USB0_USBINTR_D_SLE
//| USB0_USBINTR_D_NAKE
;
}
}
void usb_run(
usb_device_t* const device
) {
usb_interrupt_enable(device);
usb_controller_run(device);
}
static void copy_setup(usb_setup_t* const dst, const volatile uint8_t* const src) {
dst->request_type = src[0];
dst->request = src[1];
dst->value_l = src[2];
dst->value_h = src[3];
dst->index_l = src[4];
dst->index_h = src[5];
dst->length_l = src[6];
dst->length_h = src[7];
}
void usb_endpoint_init(
const usb_endpoint_t* const endpoint
) {
usb_endpoint_flush(endpoint);
uint_fast16_t max_packet_size = endpoint->device->descriptor[7];
usb_transfer_type_t transfer_type = USB_TRANSFER_TYPE_CONTROL;
const uint8_t* const endpoint_descriptor = usb_endpoint_descriptor(endpoint);
if( endpoint_descriptor ) {
max_packet_size = usb_endpoint_descriptor_max_packet_size(endpoint_descriptor);
transfer_type = usb_endpoint_descriptor_transfer_type(endpoint_descriptor);
}
// TODO: There are more capabilities to adjust based on the endpoint
// descriptor.
usb_queue_head_t* const qh = usb_queue_head(endpoint->address);
qh->capabilities
= USB_QH_CAPABILITIES_MULT(0)
| USB_QH_CAPABILITIES_ZLT
| USB_QH_CAPABILITIES_MPL(max_packet_size)
| ((transfer_type == USB_TRANSFER_TYPE_CONTROL) ? USB_QH_CAPABILITIES_IOS : 0)
;
qh->current_dtd_pointer = 0;
qh->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE;
qh->total_bytes
= USB_TD_DTD_TOKEN_TOTAL_BYTES(0)
| USB_TD_DTD_TOKEN_MULTO(0)
;
qh->buffer_pointer_page[0] = 0;
qh->buffer_pointer_page[1] = 0;
qh->buffer_pointer_page[2] = 0;
qh->buffer_pointer_page[3] = 0;
qh->buffer_pointer_page[4] = 0;
// This is how we look up an endpoint structure from an endpoint address:
qh->_reserved_0 = (uint32_t)endpoint;
// TODO: Should NAK be enabled? I'm kinda squishy on this...
//USB0_ENDPTNAKEN |=
// USB0_ENDPTNAKEN_EPRNE(1 << endpoint_out->number);
usb_endpoint_set_type(endpoint, transfer_type);
usb_endpoint_enable(endpoint);
}
static void usb_check_for_setup_events() {
const uint32_t endptsetupstat = usb_get_endpoint_setup_status();
if( endptsetupstat ) {
for( uint_fast8_t i=0; i<6; i++ ) {
const uint32_t endptsetupstat_bit = USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT(1 << i);
if( endptsetupstat & endptsetupstat_bit ) {
usb_endpoint_t* const endpoint =
usb_endpoint_from_address(
usb_endpoint_address(USB_TRANSFER_DIRECTION_OUT, i)
);
if( endpoint && endpoint->setup_complete ) {
copy_setup(&endpoint->setup, usb_queue_head(endpoint->address)->setup);
// TODO: Clean up this duplicated effort by providing
// a cleaner way to get the SETUP data.
copy_setup(&endpoint->in->setup, usb_queue_head(endpoint->address)->setup);
usb_clear_endpoint_setup_status(endptsetupstat_bit);
endpoint->setup_complete(endpoint);
} else {
usb_clear_endpoint_setup_status(endptsetupstat_bit);
}
}
}
}
}
static void usb_check_for_transfer_events() {
const uint32_t endptcomplete = usb_get_endpoint_complete();
if( endptcomplete ) {
for( uint_fast8_t i=0; i<6; i++ ) {
const uint32_t endptcomplete_out_bit = USB0_ENDPTCOMPLETE_ERCE(1 << i);
if( endptcomplete & endptcomplete_out_bit ) {
usb_clear_endpoint_complete(endptcomplete_out_bit);
usb_endpoint_t* const endpoint =
usb_endpoint_from_address(
usb_endpoint_address(USB_TRANSFER_DIRECTION_OUT, i)
);
if( endpoint && endpoint->transfer_complete ) {
endpoint->transfer_complete(endpoint);
}
}
const uint32_t endptcomplete_in_bit = USB0_ENDPTCOMPLETE_ETCE(1 << i);
if( endptcomplete & endptcomplete_in_bit ) {
usb_clear_endpoint_complete(endptcomplete_in_bit);
usb_endpoint_t* const endpoint =
usb_endpoint_from_address(
usb_endpoint_address(USB_TRANSFER_DIRECTION_IN, i)
);
if( endpoint && endpoint->transfer_complete ) {
endpoint->transfer_complete(endpoint);
}
}
}
}
}
void usb0_isr() {
const uint32_t status = usb_get_status();
if( status == 0 ) {
// Nothing to do.
return;
}
if( status & USB0_USBSTS_D_UI ) {
// USB:
// - Completed transaction transfer descriptor has IOC set.
// - Short packet detected.
// - SETUP packet received.
usb_check_for_setup_events();
usb_check_for_transfer_events();
// TODO: Reset ignored ENDPTSETUPSTAT and ENDPTCOMPLETE flags?
}
if( status & USB0_USBSTS_D_SRI ) {
// Start Of Frame received.
}
if( status & USB0_USBSTS_D_PCI ) {
// Port change detect:
// Port controller entered full- or high-speed operational state.
}
if( status & USB0_USBSTS_D_SLI ) {
// Device controller suspend.
}
if( status & USB0_USBSTS_D_URI ) {
// USB reset received.
usb_bus_reset(usb_device_usb0);
}
if( status & USB0_USBSTS_D_UEI ) {
// USB error:
// Completion of a USB transaction resulted in an error condition.
// Set along with USBINT if the TD on which the error interrupt
// occurred also had its interrupt on complete (IOC) bit set.
// The device controller detects resume signalling only.
}
if( status & USB0_USBSTS_D_NAKI ) {
// Both the TX/RX endpoint NAK bit and corresponding TX/RX endpoint
// NAK enable bit are set.
}
}
================================================
FILE: firmware/common/usb.h
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_H__
#define __USB_H__
// TODO: Refactor to support high performance operations without having to
// expose usb_transfer_descriptor_t. Or usb_endpoint_prime(). Or, or, or...
#include <libopencm3/lpc43xx/usb.h>
#include "usb_type.h"
void usb_peripheral_reset();
void usb_device_init(
const uint_fast8_t device_ordinal,
usb_device_t* const device
);
void usb_run(
usb_device_t* const device
);
void usb_run_tasks(
const usb_device_t* const device
);
usb_speed_t usb_speed(
const usb_device_t* const device
);
void usb_set_address_immediate(
const usb_device_t* const device,
const uint_fast8_t address
);
void usb_set_address_deferred(
const usb_device_t* const device,
const uint_fast8_t address
);
void usb_endpoint_init(
const usb_endpoint_t* const endpoint
);
void usb_endpoint_stall(
const usb_endpoint_t* const endpoint
);
void usb_endpoint_disable(
const usb_endpoint_t* const endpoint
);
void usb_endpoint_flush(
const usb_endpoint_t* const endpoint
);
bool usb_endpoint_is_ready(
const usb_endpoint_t* const endpoint
);
void usb_endpoint_prime(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const first_td
);
void usb_endpoint_schedule_wait(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const td
);
void usb_endpoint_schedule_append(
const usb_endpoint_t* const endpoint,
usb_transfer_descriptor_t* const tail_td,
usb_transfer_descriptor_t* const new_td
);
#endif//__USB_H__
================================================
FILE: firmware/common/usb_queue.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Ben Gamari
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <assert.h>
#include <libopencm3/cm3/cortex.h>
#include <libopencm3/cm3/sync.h>
#include "usb.h"
#include "usb_queue.h"
usb_queue_t* endpoint_queues[12] = {};
#define USB_ENDPOINT_INDEX(endpoint_address) (((endpoint_address & 0xF) * 2) + ((endpoint_address >> 7) & 1))
static usb_queue_t* endpoint_queue(
const usb_endpoint_t* const endpoint
) {
uint32_t index = USB_ENDPOINT_INDEX(endpoint->address);
if (endpoint_queues[index] == NULL) while (1);
return endpoint_queues[index];
}
void usb_queue_init(
usb_queue_t* const queue
) {
uint32_t index = USB_ENDPOINT_INDEX(queue->endpoint->address);
if (endpoint_queues[index] != NULL) while (1);
endpoint_queues[index] = queue;
usb_transfer_t* t = queue->free_transfers;
for (unsigned int i=0; i < queue->pool_size - 1; i++, t++) {
t->next = t+1;
t->queue = queue;
}
t->next = NULL;
t->queue = queue;
}
/* Allocate a transfer */
static usb_transfer_t* allocate_transfer(
usb_queue_t* const queue
) {
bool aborted;
usb_transfer_t* transfer;
if (queue->free_transfers == NULL)
return NULL;
do {
transfer = (void *) __ldrex((uint32_t *) &queue->free_transfers);
aborted = __strex((uint32_t) transfer->next, (uint32_t *) &queue->free_transfers);
} while (aborted);
transfer->next = NULL;
return transfer;
}
/* Place a transfer in the free list */
static void free_transfer(usb_transfer_t* const transfer)
{
usb_queue_t* const queue = transfer->queue;
bool aborted;
do {
transfer->next = (void *) __ldrex((uint32_t *) &queue->free_transfers);
aborted = __strex((uint32_t) transfer, (uint32_t *) &queue->free_transfers);
} while (aborted);
}
/* Add a transfer to the end of an endpoint's queue. Returns the old
* tail or NULL is the queue was empty
*/
static usb_transfer_t* endpoint_queue_transfer(
usb_transfer_t* const transfer
) {
usb_queue_t* const queue = transfer->queue;
transfer->next = NULL;
if (queue->active != NULL) {
usb_transfer_t* t = queue->active;
while (t->next != NULL) t = t->next;
t->next = transfer;
return t;
} else {
queue->active = transfer;
return NULL;
}
}
static void usb_queue_flush_queue(usb_queue_t* const queue)
{
cm_disable_interrupts();
while (queue->active) {
usb_transfer_t* transfer = queue->active;
queue->active = transfer->next;
free_transfer(transfer);
}
cm_enable_interrupts();
}
void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint)
{
usb_queue_flush_queue(endpoint_queue(endpoint));
}
int usb_transfer_schedule(
const usb_endpoint_t* const endpoint,
void* const data,
const uint32_t maximum_length,
const transfer_completion_cb completion_cb,
void* const user_data
) {
usb_queue_t* const queue = endpoint_queue(endpoint);
usb_transfer_t* const transfer = allocate_transfer(queue);
if (transfer == NULL) return -1;
usb_transfer_descriptor_t* const td = &transfer->td;
// Configure the transfer descriptor
td->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE;
td->total_bytes =
USB_TD_DTD_TOKEN_TOTAL_BYTES(maximum_length)
| USB_TD_DTD_TOKEN_IOC
| USB_TD_DTD_TOKEN_MULTO(0)
| USB_TD_DTD_TOKEN_STATUS_ACTIVE
;
td->buffer_pointer_page[0] = (uint32_t)data;
td->buffer_pointer_page[1] = ((uint32_t)data + 0x1000) & 0xfffff000;
td->buffer_pointer_page[2] = ((uint32_t)data + 0x2000) & 0xfffff000;
td->buffer_pointer_page[3] = ((uint32_t)data + 0x3000) & 0xfffff000;
td->buffer_pointer_page[4] = ((uint32_t)data + 0x4000) & 0xfffff000;
// Fill in transfer fields
transfer->maximum_length = maximum_length;
transfer->completion_cb = completion_cb;
transfer->user_data = user_data;
cm_disable_interrupts();
usb_transfer_t* tail = endpoint_queue_transfer(transfer);
if (tail == NULL) {
// The queue is currently empty, we need to re-prime
usb_endpoint_schedule_wait(queue->endpoint, &transfer->td);
} else {
// The queue is currently running, try to append
usb_endpoint_schedule_append(queue->endpoint, &tail->td, &transfer->td);
}
cm_enable_interrupts();
return 0;
}
int usb_transfer_schedule_block(
const usb_endpoint_t* const endpoint,
void* const data,
const uint32_t maximum_length,
const transfer_completion_cb completion_cb,
void* const user_data
) {
int ret;
do {
ret = usb_transfer_schedule(endpoint, data, maximum_length,
completion_cb, user_data);
} while (ret == -1);
return 0;
}
int usb_transfer_schedule_ack(
const usb_endpoint_t* const endpoint
) {
return usb_transfer_schedule_block(endpoint, 0, 0, NULL, NULL);
}
/* Called when an endpoint might have completed a transfer */
void usb_queue_transfer_complete(usb_endpoint_t* const endpoint)
{
usb_queue_t* const queue = endpoint_queue(endpoint);
if (queue == NULL) while(1); // Uh oh
usb_transfer_t* transfer = queue->active;
while (transfer != NULL) {
uint8_t status = transfer->td.total_bytes;
// Check for failures
if ( status & USB_TD_DTD_TOKEN_STATUS_HALTED
|| status & USB_TD_DTD_TOKEN_STATUS_BUFFER_ERROR
|| status & USB_TD_DTD_TOKEN_STATUS_TRANSACTION_ERROR) {
// TODO: Uh oh, do something useful here
while (1);
}
// Still not finished
if (status & USB_TD_DTD_TOKEN_STATUS_ACTIVE)
break;
// Advance the head. We need to do this before invoking the completion
// callback as it might attempt to schedule a new transfer
queue->active = transfer->next;
usb_transfer_t* next = transfer->next;
// Invoke completion callback
unsigned int total_bytes = (transfer->td.total_bytes & USB_TD_DTD_TOKEN_TOTAL_BYTES_MASK) >> USB_TD_DTD_TOKEN_TOTAL_BYTES_SHIFT;
unsigned int transferred = transfer->maximum_length - total_bytes;
if (transfer->completion_cb)
transfer->completion_cb(transfer->user_data, transferred);
// Advance head and free transfer
free_transfer(transfer);
transfer = next;
}
}
================================================
FILE: firmware/common/usb_queue.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Ben Gamari
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_QUEUE_H__
#define __USB_QUEUE_H__
#include <libopencm3/lpc43xx/usb.h>
#include "usb_type.h"
typedef struct _usb_transfer_t usb_transfer_t;
typedef struct _usb_queue_t usb_queue_t;
typedef void (*transfer_completion_cb)(void*, unsigned int);
// This is an opaque datatype. Thou shall not touch these members.
struct _usb_transfer_t {
struct _usb_transfer_t* next;
usb_transfer_descriptor_t td ATTR_ALIGNED(64);
unsigned int maximum_length;
struct _usb_queue_t* queue;
transfer_completion_cb completion_cb;
void* user_data;
};
// This is an opaque datatype. Thou shall not touch these members.
struct _usb_queue_t {
struct usb_endpoint_t* endpoint;
const unsigned int pool_size;
usb_transfer_t* volatile free_transfers;
usb_transfer_t* volatile active;
};
#define USB_DECLARE_QUEUE(endpoint_name) \
struct _usb_queue_t endpoint_name##_queue;
#define USB_DEFINE_QUEUE(endpoint_name, _pool_size) \
struct _usb_transfer_t endpoint_name##_transfers[_pool_size]; \
struct _usb_queue_t endpoint_name##_queue = { \
.endpoint = &endpoint_name, \
.free_transfers = endpoint_name##_transfers, \
.pool_size = _pool_size \
};
void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint);
int usb_transfer_schedule(
const usb_endpoint_t* const endpoint,
void* const data,
const uint32_t maximum_length,
const transfer_completion_cb completion_cb,
void* const user_data
);
int usb_transfer_schedule_block(
const usb_endpoint_t* const endpoint,
void* const data,
const uint32_t maximum_length,
const transfer_completion_cb completion_cb,
void* const user_data
);
int usb_transfer_schedule_ack(
const usb_endpoint_t* const endpoint
);
void usb_queue_init(
usb_queue_t* const queue
);
void usb_queue_transfer_complete(
usb_endpoint_t* const endpoint
);
#endif//__USB_QUEUE_H__
================================================
FILE: firmware/common/usb_request.c
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "usb.h"
#include "usb_request.h"
#include "usb_queue.h"
#include <stdbool.h>
static void usb_request(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
usb_request_status_t status = USB_REQUEST_STATUS_STALL;
usb_request_handler_fn handler = 0;
switch( endpoint->setup.request_type & USB_SETUP_REQUEST_TYPE_mask ) {
case USB_SETUP_REQUEST_TYPE_STANDARD:
handler = usb_request_handlers.standard;
break;
case USB_SETUP_REQUEST_TYPE_CLASS:
handler = usb_request_handlers.class;
break;
case USB_SETUP_REQUEST_TYPE_VENDOR:
handler = usb_request_handlers.vendor;
break;
case USB_SETUP_REQUEST_TYPE_RESERVED:
handler = usb_request_handlers.reserved;
break;
}
if( handler ) {
status = handler(endpoint, stage);
}
if( status != USB_REQUEST_STATUS_OK ) {
// USB 2.0 section 9.2.7 "Request Error"
usb_endpoint_stall(endpoint);
}
}
void usb_setup_complete(
usb_endpoint_t* const endpoint
) {
usb_request(endpoint, USB_TRANSFER_STAGE_SETUP);
}
void usb_control_out_complete(
usb_endpoint_t* const endpoint
) {
const bool device_to_host =
endpoint->setup.request_type >> USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift;
if( device_to_host ) {
usb_request(endpoint, USB_TRANSFER_STAGE_STATUS);
} else {
usb_request(endpoint, USB_TRANSFER_STAGE_DATA);
}
usb_queue_transfer_complete(endpoint);
}
void usb_control_in_complete(
usb_endpoint_t* const endpoint
) {
const bool device_to_host =
endpoint->setup.request_type >> USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift;
if( device_to_host ) {
usb_request(endpoint, USB_TRANSFER_STAGE_DATA);
} else {
usb_request(endpoint, USB_TRANSFER_STAGE_STATUS);
}
usb_queue_transfer_complete(endpoint);
}
================================================
FILE: firmware/common/usb_request.h
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_REQUEST_H__
#define __USB_REQUEST_H__
#include "usb_type.h"
typedef enum {
USB_RESPONSE_NONE,
USB_RESPONSE_IN,
USB_RESPONSE_OUT,
USB_RESPONSE_STALL,
} usb_endpoint_type_t;
typedef enum {
USB_TRANSFER_STAGE_SETUP,
USB_TRANSFER_STAGE_DATA,
USB_TRANSFER_STAGE_STATUS,
} usb_transfer_stage_t;
typedef enum {
USB_REQUEST_STATUS_OK = 0,
USB_REQUEST_STATUS_STALL = 1,
} usb_request_status_t;
typedef usb_request_status_t (*usb_request_handler_fn)(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
typedef struct {
usb_request_handler_fn standard;
usb_request_handler_fn class;
usb_request_handler_fn vendor;
usb_request_handler_fn reserved;
} usb_request_handlers_t;
extern const usb_request_handlers_t usb_request_handlers;
void usb_setup_complete(
usb_endpoint_t* const endpoint
);
void usb_control_in_complete(
usb_endpoint_t* const endpoint
);
void usb_control_out_complete(
usb_endpoint_t* const endpoint
);
#endif//__USB_REQUEST_H__
================================================
FILE: firmware/common/usb_standard_request.c
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include <stddef.h>
#include "usb_standard_request.h"
#include "usb.h"
#include "usb_type.h"
#include "usb_queue.h"
const uint8_t* usb_endpoint_descriptor(
const usb_endpoint_t* const endpoint
) {
const usb_configuration_t* const configuration = endpoint->device->configuration;
if( configuration ) {
const uint8_t* descriptor = configuration->descriptor;
while( descriptor[0] != 0 ) {
if( descriptor[1] == USB_DESCRIPTOR_TYPE_ENDPOINT ) {
if( descriptor[2] == endpoint->address ) {
return descriptor;
}
}
descriptor += descriptor[0];
}
}
return 0;
}
uint_fast16_t usb_endpoint_descriptor_max_packet_size(
const uint8_t* const endpoint_descriptor
) {
return (endpoint_descriptor[5] << 8) | endpoint_descriptor[4];
}
usb_transfer_type_t usb_endpoint_descriptor_transfer_type(
const uint8_t* const endpoint_descriptor
) {
return (endpoint_descriptor[3] & 0x3);
}
void (*usb_configuration_changed_cb)(usb_device_t* const) = NULL;
void usb_set_configuration_changed_cb(
void (*callback)(usb_device_t* const)
) {
usb_configuration_changed_cb = callback;
}
bool usb_set_configuration(
usb_device_t* const device,
const uint_fast8_t configuration_number
) {
const usb_configuration_t* new_configuration = 0;
if( configuration_number != 0 ) {
// Locate requested configuration.
if( device->configurations ) {
usb_configuration_t** configurations = *(device->configurations);
uint32_t i = 0;
const usb_speed_t usb_speed_current = usb_speed(device);
while( configurations[i] ) {
if( (configurations[i]->speed == usb_speed_current) &&
(configurations[i]->number == configuration_number) ) {
new_configuration = configurations[i];
break;
}
i++;
}
}
// Requested configuration not found: request error.
if( new_configuration == 0 ) {
return false;
}
}
if( new_configuration != device->configuration ) {
// Configuration changed.
device->configuration = new_configuration;
}
if (usb_configuration_changed_cb)
usb_configuration_changed_cb(device);
return true;
}
static usb_request_status_t usb_send_descriptor(
usb_endpoint_t* const endpoint,
const uint8_t* const descriptor_data
) {
const uint32_t setup_length = endpoint->setup.length;
uint32_t descriptor_length = descriptor_data[0];
if( descriptor_data[1] == USB_DESCRIPTOR_TYPE_CONFIGURATION ) {
descriptor_length = (descriptor_data[3] << 8) | descriptor_data[2];
}
// We cast the const away but this shouldn't be a problem as this is a write transfer
usb_transfer_schedule_block(
endpoint->in,
(uint8_t* const) descriptor_data,
(setup_length > descriptor_length) ? descriptor_length : setup_length,
NULL, NULL
);
usb_transfer_schedule_ack(endpoint->out);
return USB_REQUEST_STATUS_OK;
}
static usb_request_status_t usb_send_descriptor_string(
usb_endpoint_t* const endpoint
) {
uint_fast8_t index = endpoint->setup.value_l;
for( uint_fast8_t i=0; endpoint->device->descriptor_strings[i] != 0; i++ ) {
if( i == index ) {
return usb_send_descriptor(endpoint, endpoint->device->descriptor_strings[i]);
}
}
return USB_REQUEST_STATUS_STALL;
}
static usb_request_status_t usb_send_descriptor_config(
usb_endpoint_t* const endpoint,
usb_speed_t speed,
const uint8_t config_num
) {
usb_configuration_t** config = *(endpoint->device->configurations);
unsigned int i = 0;
for( ; *config != NULL; config++ ) {
if( (*config)->speed == speed) {
if (i == config_num) {
return usb_send_descriptor(endpoint, (*config)->descriptor);
} else {
i++;
}
}
}
return USB_REQUEST_STATUS_STALL;
}
static usb_request_status_t usb_standard_request_get_descriptor_setup(
usb_endpoint_t* const endpoint
) {
switch( endpoint->setup.value_h ) {
case USB_DESCRIPTOR_TYPE_DEVICE:
return usb_send_descriptor(endpoint, endpoint->device->descriptor);
case USB_DESCRIPTOR_TYPE_CONFIGURATION:
// TODO: Duplicated code. Refactor.
if( usb_speed(endpoint->device) == USB_SPEED_HIGH ) {
return usb_send_descriptor_config(endpoint, USB_SPEED_HIGH, endpoint->setup.value_l);
} else {
return usb_send_descriptor_config(endpoint, USB_SPEED_FULL, endpoint->setup.value_l);
}
case USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER:
return usb_send_descriptor(endpoint, endpoint->device->qualifier_descriptor);
case USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION:
// TODO: Duplicated code. Refactor.
if( usb_speed(endpoint->device) == USB_SPEED_HIGH ) {
return usb_send_descriptor_config(endpoint, USB_SPEED_FULL, endpoint->setup.value_l);
} else {
return usb_send_descriptor_config(endpoint, USB_SPEED_HIGH, endpoint->setup.value_l);
}
case USB_DESCRIPTOR_TYPE_STRING:
return usb_send_descriptor_string(endpoint);
case USB_DESCRIPTOR_TYPE_INTERFACE:
case USB_DESCRIPTOR_TYPE_ENDPOINT:
default:
return USB_REQUEST_STATUS_STALL;
}
}
static usb_request_status_t usb_standard_request_get_descriptor(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
switch( stage ) {
case USB_TRANSFER_STAGE_SETUP:
return usb_standard_request_get_descriptor_setup(endpoint);
case USB_TRANSFER_STAGE_DATA:
case USB_TRANSFER_STAGE_STATUS:
return USB_REQUEST_STATUS_OK;
default:
return USB_REQUEST_STATUS_STALL;
}
}
/*********************************************************************/
static usb_request_status_t usb_standard_request_set_address_setup(
usb_endpoint_t* const endpoint
) {
usb_set_address_deferred(endpoint->device, endpoint->setup.value_l);
usb_transfer_schedule_ack(endpoint->in);
return USB_REQUEST_STATUS_OK;
}
static usb_request_status_t usb_standard_request_set_address(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
switch( stage ) {
case USB_TRANSFER_STAGE_SETUP:
return usb_standard_request_set_address_setup(endpoint);
case USB_TRANSFER_STAGE_DATA:
case USB_TRANSFER_STAGE_STATUS:
/* NOTE: Not necessary to set address here, as DEVICEADR.USBADRA bit
* will cause controller to automatically perform set address
* operation on IN ACK.
*/
return USB_REQUEST_STATUS_OK;
default:
return USB_REQUEST_STATUS_STALL;
}
}
/*********************************************************************/
static usb_request_status_t usb_standard_request_set_configuration_setup(
usb_endpoint_t* const endpoint
) {
const uint8_t usb_configuration = endpoint->setup.value_l;
if( usb_set_configuration(endpoint->device, usb_configuration) ) {
if( usb_configuration == 0 ) {
// TODO: Should this be done immediately?
usb_set_address_immediate(endpoint->device, 0);
}
usb_transfer_schedule_ack(endpoint->in);
return USB_REQUEST_STATUS_OK;
} else {
return USB_REQUEST_STATUS_STALL;
}
}
static usb_request_status_t usb_standard_request_set_configuration(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
switch( stage ) {
case USB_TRANSFER_STAGE_SETUP:
return usb_standard_request_set_configuration_setup(endpoint);
case USB_TRANSFER_STAGE_DATA:
case USB_TRANSFER_STAGE_STATUS:
return USB_REQUEST_STATUS_OK;
default:
return USB_REQUEST_STATUS_STALL;
}
}
/*********************************************************************/
static usb_request_status_t usb_standard_request_get_configuration_setup(
usb_endpoint_t* const endpoint
) {
if( endpoint->setup.length == 1 ) {
endpoint->buffer[0] = 0;
if( endpoint->device->configuration ) {
endpoint->buffer[0] = endpoint->device->configuration->number;
}
usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL);
usb_transfer_schedule_ack(endpoint->out);
return USB_REQUEST_STATUS_OK;
} else {
return USB_REQUEST_STATUS_STALL;
}
}
static usb_request_status_t usb_standard_request_get_configuration(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
switch( stage ) {
case USB_TRANSFER_STAGE_SETUP:
return usb_standard_request_get_configuration_setup(endpoint);
case USB_TRANSFER_STAGE_DATA:
case USB_TRANSFER_STAGE_STATUS:
return USB_REQUEST_STATUS_OK;
default:
return USB_REQUEST_STATUS_STALL;
}
}
/*********************************************************************/
usb_request_status_t usb_standard_request(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
switch( endpoint->setup.request ) {
case USB_STANDARD_REQUEST_GET_DESCRIPTOR:
return usb_standard_request_get_descriptor(endpoint, stage);
case USB_STANDARD_REQUEST_SET_ADDRESS:
return usb_standard_request_set_address(endpoint, stage);
case USB_STANDARD_REQUEST_SET_CONFIGURATION:
return usb_standard_request_set_configuration(endpoint, stage);
case USB_STANDARD_REQUEST_GET_CONFIGURATION:
return usb_standard_request_get_configuration(endpoint, stage);
default:
return USB_REQUEST_STATUS_STALL;
}
}
================================================
FILE: firmware/common/usb_standard_request.h
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_STANDARD_REQUEST_H__
#define __USB_STANDARD_REQUEST_H__
#include "usb_type.h"
#include "usb_request.h"
void usb_set_configuration_changed_cb(
void (*callback)(usb_device_t* const)
);
usb_request_status_t usb_standard_request(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
const uint8_t* usb_endpoint_descriptor(
const usb_endpoint_t* const endpoint
);
uint_fast16_t usb_endpoint_descriptor_max_packet_size(
const uint8_t* const endpoint_descriptor
);
usb_transfer_type_t usb_endpoint_descriptor_transfer_type(
const uint8_t* const endpoint_descriptor
);
bool usb_set_configuration(
usb_device_t* const device,
const uint_fast8_t configuration_number
);
#endif//__USB_STANDARD_REQUEST_H__
================================================
FILE: firmware/common/usb_type.h
================================================
/*
* Copyright 2012 Jared Boone
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_TYPE_H__
#define __USB_TYPE_H__
#include <stdint.h>
#include <stdbool.h>
// TODO: Move this to some common compiler-tricks location.
#define ATTR_PACKED __attribute__((packed))
#define ATTR_ALIGNED(x) __attribute__ ((aligned(x)))
#define ATTR_SECTION(x) __attribute__ ((section(x)))
typedef struct ATTR_PACKED {
uint8_t request_type;
uint8_t request;
union {
struct {
uint8_t value_l;
uint8_t value_h;
};
uint16_t value;
};
union {
struct {
uint8_t index_l;
uint8_t index_h;
};
uint16_t index;
};
union {
struct {
uint8_t length_l;
uint8_t length_h;
};
uint16_t length;
};
} usb_setup_t;
typedef enum {
USB_STANDARD_REQUEST_GET_STATUS = 0,
USB_STANDARD_REQUEST_CLEAR_FEATURE = 1,
USB_STANDARD_REQUEST_SET_FEATURE = 3,
USB_STANDARD_REQUEST_SET_ADDRESS = 5,
USB_STANDARD_REQUEST_GET_DESCRIPTOR = 6,
USB_STANDARD_REQUEST_SET_DESCRIPTOR = 7,
USB_STANDARD_REQUEST_GET_CONFIGURATION = 8,
USB_STANDARD_REQUEST_SET_CONFIGURATION = 9,
USB_STANDARD_REQUEST_GET_INTERFACE = 10,
USB_STANDARD_REQUEST_SET_INTERFACE = 11,
USB_STANDARD_REQUEST_SYNCH_FRAME = 12,
} usb_standard_request_t;
typedef enum {
USB_SETUP_REQUEST_TYPE_shift = 5,
USB_SETUP_REQUEST_TYPE_mask = 3 << USB_SETUP_REQUEST_TYPE_shift,
USB_SETUP_REQUEST_TYPE_STANDARD = 0 << USB_SETUP_REQUEST_TYPE_shift,
USB_SETUP_REQUEST_TYPE_CLASS = 1 << USB_SETUP_REQUEST_TYPE_shift,
USB_SETUP_REQUEST_TYPE_VENDOR = 2 << USB_SETUP_REQUEST_TYPE_shift,
USB_SETUP_REQUEST_TYPE_RESERVED = 3 << USB_SETUP_REQUEST_TYPE_shift,
USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift = 7,
USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_mask = 1 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift,
USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_HOST_TO_DEVICE = 0 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift,
USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_DEVICE_TO_HOST = 1 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift,
} usb_setup_request_type_t;
typedef enum {
USB_TRANSFER_DIRECTION_OUT = 0,
USB_TRANSFER_DIRECTION_IN = 1,
} usb_transfer_direction_t;
typedef enum {
USB_DESCRIPTOR_TYPE_DEVICE = 1,
USB_DESCRIPTOR_TYPE_CONFIGURATION = 2,
USB_DESCRIPTOR_TYPE_STRING = 3,
USB_DESCRIPTOR_TYPE_INTERFACE = 4,
USB_DESCRIPTOR_TYPE_ENDPOINT = 5,
USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER = 6,
USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION = 7,
USB_DESCRIPTOR_TYPE_INTERFACE_POWER = 8,
} usb_descriptor_type_t;
typedef enum {
USB_TRANSFER_TYPE_CONTROL = 0,
USB_TRANSFER_TYPE_ISOCHRONOUS = 1,
USB_TRANSFER_TYPE_BULK = 2,
USB_TRANSFER_TYPE_INTERRUPT = 3,
} usb_transfer_type_t;
typedef enum {
USB_SPEED_LOW = 0,
USB_SPEED_FULL = 1,
USB_SPEED_HIGH = 2,
USB_SPEED_SUPER = 3,
} usb_speed_t;
typedef struct {
const uint8_t* const descriptor;
const uint32_t number;
const usb_speed_t speed;
} usb_configuration_t;
typedef struct {
const uint8_t* const descriptor;
uint8_t** descriptor_strings;
const uint8_t* const qualifier_descriptor;
usb_configuration_t* (*configurations)[];
const usb_configuration_t* configuration;
} usb_device_t;
typedef struct usb_endpoint_t usb_endpoint_t;
struct usb_endpoint_t {
usb_setup_t setup;
uint8_t buffer[8]; // Buffer for use during IN stage.
const uint_fast8_t address;
usb_device_t* const device;
usb_endpoint_t* const in;
usb_endpoint_t* const out;
void (*setup_complete)(usb_endpoint_t* const endpoint);
void (*transfer_complete)(usb_endpoint_t* const endpoint);
};
#endif//__USB_TYPE_H__
================================================
FILE: firmware/common/w25q80bv.c
================================================
/*
* Copyright 2013 Michael Ossmann
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
/*
* This is a rudimentary driver for the W25Q80BV SPI Flash IC using the
* LPC43xx's SSP0 peripheral (not quad SPIFI). The only goal here is to allow
* programming the flash.
*/
#include <stdint.h>
#include "w25q80bv.h"
#include "hackrf_core.h"
#include <libopencm3/lpc43xx/ssp.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/rgu.h>
/*
* Set up pins for GPIO and SPI control, configure SSP0 peripheral for SPI.
* SSP0_SSEL is controlled by GPIO in order to handle various transfer lengths.
*/
void w25q80bv_setup(void)
{
uint8_t device_id;
const uint8_t serial_clock_rate = 2;
const uint8_t clock_prescale_rate = 2;
/* Reset SPIFI peripheral before to Erase/Write SPIFI memory through SPI */
RESET_CTRL1 = RESET_CTRL1_SPIFI_RST;
/* Init SPIFI GPIO to Normal GPIO */
scu_pinmux(P3_3, (SCU_SSP_IO | SCU_CONF_FUNCTION2)); // P3_3 SPIFI_SCK => SSP0_SCK
scu_pinmux(P3_4, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_4 SPIFI SPIFI_SIO3 IO3 => GPIO1[14]
scu_pinmux(P3_5, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_5 SPIFI SPIFI_SIO2 IO2 => GPIO1[15]
scu_pinmux(P3_6, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_6 SPIFI SPIFI_MISO IO1 => GPIO0[6]
scu_pinmux(P3_7, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_7 SPIFI SPIFI_MOSI IO0 => GPIO5[10]
scu_pinmux(P3_8, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_8 SPIFI SPIFI_CS => GPIO5[11]
/* configure SSP pins */
scu_pinmux(SCU_SSP0_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP0_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5));
scu_pinmux(SCU_SSP0_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION2));
/* configure GPIO pins */
scu_pinmux(SCU_FLASH_HOLD, SCU_GPIO_FAST);
scu_pinmux(SCU_FLASH_WP, SCU_GPIO_FAST);
scu_pinmux(SCU_SSP0_SSEL, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4));
/* drive SSEL, HOLD, and WP pins high */
gpio_set(PORT_FLASH, (PIN_FLASH_HOLD | PIN_FLASH_WP));
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
/* Set GPIO pins as outputs. */
GPIO1_DIR |= (PIN_FLASH_HOLD | PIN_FLASH_WP);
GPIO5_DIR |= PIN_SSP0_SSEL;
/* initialize SSP0 */
ssp_init(SSP0_NUM,
SSP_DATA_8BITS,
SSP_FRAME_SPI,
SSP_CPOL_0_CPHA_0,
serial_clock_rate,
clock_prescale_rate,
SSP_MODE_NORMAL,
SSP_MASTER,
SSP_SLAVE_OUT_ENABLE);
device_id = 0;
while(device_id != W25Q80BV_DEVICE_ID_RES)
{
device_id = w25q80bv_get_device_id();
}
}
uint8_t w25q80bv_get_status(void)
{
uint8_t value;
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_READ_STATUS1);
value = ssp_transfer(SSP0_NUM, 0xFF);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
return value;
}
/* Release power down / Device ID */
uint8_t w25q80bv_get_device_id(void)
{
uint8_t value;
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_DEVICE_ID);
/* Read 3 dummy bytes */
value = ssp_transfer(SSP0_NUM, 0xFF);
value = ssp_transfer(SSP0_NUM, 0xFF);
value = ssp_transfer(SSP0_NUM, 0xFF);
/* Read Device ID shall return 0x13 for W25Q80BV */
value = ssp_transfer(SSP0_NUM, 0xFF);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
return value;
}
void w25q80bv_get_unique_id(w25q80bv_unique_id_t* unique_id)
{
int i;
uint8_t value;
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_UNIQUE_ID);
/* Read 4 dummy bytes */
for(i=0; i<4; i++)
value = ssp_transfer(SSP0_NUM, 0xFF);
/* Read Unique ID 64bits (8*8) */
for(i=0; i<8; i++)
{
value = ssp_transfer(SSP0_NUM, 0xFF);
unique_id->id_8b[i] = value;
}
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
}
void w25q80bv_wait_while_busy(void)
{
while (w25q80bv_get_status() & W25Q80BV_STATUS_BUSY);
}
void w25q80bv_write_enable(void)
{
w25q80bv_wait_while_busy();
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_WRITE_ENABLE);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
}
void w25q80bv_chip_erase(void)
{
uint8_t device_id;
device_id = 0;
while(device_id != W25Q80BV_DEVICE_ID_RES)
{
device_id = w25q80bv_get_device_id();
}
w25q80bv_write_enable();
w25q80bv_wait_while_busy();
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_CHIP_ERASE);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
}
/* write up a 256 byte page or partial page */
void w25q80bv_page_program(const uint32_t addr, const uint16_t len, const uint8_t* data)
{
int i;
/* do nothing if asked to write beyond a page boundary */
if (((addr & 0xFF) + len) > W25Q80BV_PAGE_LEN)
return;
/* do nothing if we would overflow the flash */
if (addr > (W25Q80BV_NUM_BYTES - len))
return;
w25q80bv_write_enable();
w25q80bv_wait_while_busy();
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_PAGE_PROGRAM);
ssp_transfer(SSP0_NUM, (addr & 0xFF0000) >> 16);
ssp_transfer(SSP0_NUM, (addr & 0xFF00) >> 8);
ssp_transfer(SSP0_NUM, addr & 0xFF);
for (i = 0; i < len; i++)
ssp_transfer(SSP0_NUM, data[i]);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
}
void w25q80bv_read_page(const uint32_t addr, const uint16_t len, uint8_t* data)
{
int i;
w25q80bv_write_enable();
w25q80bv_wait_while_busy();
gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
ssp_transfer(SSP0_NUM, W25Q80BV_READ_DATA);
ssp_transfer(SSP0_NUM, (addr & 0xFF0000) >> 16);
ssp_transfer(SSP0_NUM, (addr & 0xFF00) >> 8);
ssp_transfer(SSP0_NUM, addr & 0xFF);
for (i = 0; i < len; i++)
data[i] = ssp_transfer(SSP0_NUM, 0xFF);
gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL);
}
/* write an arbitrary number of bytes */
void w25q80bv_program(uint32_t addr, uint32_t len, const uint8_t* data)
{
uint16_t first_block_len;
uint8_t device_id;
device_id = 0;
while(device_id != W25Q80BV_DEVICE_ID_RES)
{
device_id = w25q80bv_get_device_id();
}
/* do nothing if we would overflow the flash */
if ((len > W25Q80BV_NUM_BYTES) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES))
return;
/* handle start not at page boundary */
first_block_len = W25Q80BV_PAGE_LEN - (addr % W25Q80BV_PAGE_LEN);
if (len < first_block_len)
first_block_len = len;
if (first_block_len) {
w25q80bv_page_program(addr, first_block_len, data);
addr += first_block_len;
data += first_block_len;
len -= first_block_len;
}
/* one page at a time on boundaries */
while (len >= W25Q80BV_PAGE_LEN) {
w25q80bv_page_program(addr, W25Q80BV_PAGE_LEN, data);
addr += W25Q80BV_PAGE_LEN;
data += W25Q80BV_PAGE_LEN;
len -= W25Q80BV_PAGE_LEN;
}
/* handle end not at page boundary */
if (len) {
w25q80bv_page_program(addr, len, data);
}
}
================================================
FILE: firmware/common/w25q80bv.h
================================================
/*
* Copyright 2013 Michael Ossmann
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __W25Q80BV_H__
#define __W25Q80BV_H__
#define W25Q80BV_PAGE_LEN 256U
#define W25Q80BV_NUM_PAGES 16384U
#define W25Q80BV_NUM_BYTES 4194304U
#define W25Q80BV_WRITE_ENABLE 0x06
#define W25Q80BV_CHIP_ERASE 0xC7
#define W25Q80BV_READ_STATUS1 0x05
#define W25Q80BV_PAGE_PROGRAM 0x02
#define W25Q80BV_DEVICE_ID 0xAB
#define W25Q80BV_UNIQUE_ID 0x4B
#define W25Q80BV_READ_DATA 0x03
#define W25Q80BV_STATUS_BUSY 0x01
#define W25Q80BV_DEVICE_ID_RES 0x15 /* Expected device_id for W25Q80BV */
typedef union
{
uint64_t id_64b;
uint32_t id_32b[2]; /* 2*32bits 64bits Unique ID */
uint8_t id_8b[8]; /* 8*8bits 64bits Unique ID */
} w25q80bv_unique_id_t;
void w25q80bv_setup(void);
void w25q80bv_chip_erase(void);
void w25q80bv_program(uint32_t addr, uint32_t len, const uint8_t* data);
uint8_t w25q80bv_get_device_id(void);
void w25q80bv_get_unique_id(w25q80bv_unique_id_t* unique_id);
void w25q80bv_read_page(const uint32_t addr, const uint16_t len, uint8_t* data);
#endif//__W25Q80BV_H__
================================================
FILE: firmware/hackrf-common.cmake
================================================
# Copyright 2009 Uwe Hermann <uwe@hermann-uwe.de>
# Copyright 2010 Piotr Esden-Tempski <piotr@esden.net>
# Copyright 2012 Michael Ossmann <mike@ossmann.com>
# Copyright 2012 Benjamin Vernoux <titanmkd@gmail.com>
# Copyright 2012 Jared Boone <jared@sharebrained.com>
#
# This file is part of HackRF.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
# derived primarily from Makefiles in libopencm3
enable_language(C CXX ASM)
SET(PATH_HACKRF ../..)
SET(PATH_HACKRF_FIRMWARE ${PATH_HACKRF}/firmware)
SET(PATH_HACKRF_FIRMWARE_COMMON ${PATH_HACKRF_FIRMWARE}/common)
SET(LIBOPENCM3 ${PATH_HACKRF_FIRMWARE}/libopencm3)
execute_process(
COMMAND git log -n 1 --format=%h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE GIT_VERSION_FOUND
ERROR_QUIET
OUTPUT_VARIABLE GIT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (GIT_VERSION_FOUND)
set(VERSION "unknown")
else (GIT_VERSION_FOUND)
set(VERSION ${GIT_VERSION})
endif (GIT_VERSION_FOUND)
if(NOT DEFINED BOARD)
set(BOARD HACKRF_ONE)
endif()
if(NOT DEFINED RUN_FROM)
set(RUN_FROM SPIFI)
endif()
set(MCU_PARTNO LPC4320)
if(NOT DEFINED SRC_M0)
set(SRC_M0 "${PATH_HACKRF_FIRMWARE_COMMON}/m0_sleep.c")
endif()
SET(HACKRF_OPTS "-D${BOARD} -DLPC43XX -D${MCU_PARTNO} -DTX_ENABLE -D'VERSION_STRING=\"git-${VERSION}\"' -DRUN_FROM=${RUN_FROM}")
SET(LDSCRIPT_M4 "-T${PATH_HACKRF_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld")
if( RUN_FROM STREQUAL "RAM")
SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx.ld")
else()
SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx_rom_to_ram.ld")
endif()
SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -T${PATH_HACKRF_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld")
SET(LDSCRIPT_M0 "-T${PATH_HACKRF_FIRMWARE_COMMON}/LPC43xx_M0_memory.ld -Tlibopencm3_lpc43xx_m0.ld")
SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${HACKRF_OPTS} ${COMMON_FLAGS} -fno-common -MD")
SET(LDFLAGS_COMMON "-nostartfiles -Wl,--gc-sections")
if(V STREQUAL "1")
SET(LDFLAGS_COMMON "${LDFLAGS_COMMON} -Wl,--print-gc-sections")
endif()
SET(CPUFLAGS_M0 "-mthumb -mcpu=cortex-m0 -mfloat-abi=soft")
SET(CFLAGS_M0 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0")
SET(CXXFLAGS_M0 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0")
SET(LDFLAGS_M0 "${LDFLAGS_COMMON} ${CPUFLAGS_M0} ${LDSCRIPT_M0} -Xlinker -Map=m0.map --specs=nano.specs")
SET(CPUFLAGS_M4 "-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16")
SET(CFLAGS_M4 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4")
SET(CXXFLAGS_M4 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4")
SET(LDFLAGS_M4 "${LDFLAGS_COMMON} ${CPUFLAGS_M4} ${LDSCRIPT_M4} -Xlinker -Map=m4.map")
set(BUILD_SHARED_LIBS OFF)
include_directories("${LIBOPENCM3}/include/")
include_directories("${PATH_HACKRF_FIRMWARE_COMMON}")
macro(DeclareTargets)
configure_file(
${PATH_HACKRF_FIRMWARE_COMMON}/m0_bin.s.cmake
m0_bin.s
)
link_directories(
"${PATH_HACKRF_FIRMWARE_COMMON}"
"${LIBOPENCM3}/lib"
"${LIBOPENCM3}/lib/lpc43xx"
"${CMAKE_INSTALL_PREFIX}/lib/armv7e-m/fpu"
)
add_executable(${PROJECT_NAME}_m0.elf ${SRC_M0})
target_link_libraries(
${PROJECT_NAME}_m0.elf
c
nosys
opencm3_lpc43xx_m0
)
set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M0}")
set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M0}")
add_custom_target(
${PROJECT_NAME}_m0.bin
DEPENDS ${PROJECT_NAME}_m0.elf
COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}_m0.elf ${PROJECT_NAME}_m0.bin
)
add_executable(${PROJECT_NAME}.elf
${SRC_M4}
${PATH_HACKRF_FIRMWARE_COMMON}/hackrf_core.c
${PATH_HACKRF_FIRMWARE_COMMON}/sgpio.c
${PATH_HACKRF_FIRMWARE_COMMON}/mcp4022.c
${PATH_HACKRF_FIRMWARE_COMMON}/rf_path.c
m0_bin.s
)
add_dependencies(${PROJECT_NAME}.elf ${PROJECT_NAME}_m0.bin)
target_link_libraries(
${PROJECT_NAME}.elf
c
nosys
opencm3_lpc43xx
m
)
set_target_properties(${PROJECT_NAME}.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M4}")
set_target_properties(${PROJECT_NAME}.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M4}")
add_custom_target(
${PROJECT_NAME}.bin
DEPENDS ${PROJECT_NAME}.elf
COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}.elf ${PROJECT_NAME}.bin
)
add_custom_target(
${PROJECT_NAME}.dfu ALL
DEPENDS ${PROJECT_NAME}.bin
COMMAND rm -f _tmp.dfu _header.bin
COMMAND cp ${PROJECT_NAME}.bin _tmp.dfu
COMMAND dfu-suffix --vid=0x1fc9 --pid=0x000c --did=0x0 -s 0 -a _tmp.dfu
COMMAND python -c \"import os.path\; import struct\; print\('0000000: da ff ' + ' '.join\(map\(lambda s: '%02x' % ord\(s\), struct.pack\('<H', os.path.getsize\('${PROJECT_NAME}.bin'\) / 512 + 1\)\)\) + ' ff ff ff ff'\)\" | xxd -g1 -r > _header.bin
COMMAND cat _header.bin _tmp.dfu >${PROJECT_NAME}.dfu
COMMAND rm -f _tmp.dfu _header.bin
)
add_custom_target(
${PROJECT_NAME}-program
DEPENDS ${PROJECT_NAME}.dfu
COMMAND dfu-util --device 1fc9:000c --alt 0 --download ${PROJECT_NAME}.dfu
)
endmacro()
================================================
FILE: firmware/hackrf_usb/CMakeLists.txt
================================================
# Copyright 2012 Jared Boone <jared@sharebrained.com>
#
# This file is part of HackRF.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(hackrf_usb)
include(../hackrf-common.cmake)
set(SRC_M4
hackrf_usb.c
"${PATH_HACKRF_FIRMWARE_COMMON}/streaming.c"
sgpio_isr.c
usb_bulk_buffer.c
"${PATH_HACKRF_FIRMWARE_COMMON}/usb.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/usb_request.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/usb_standard_request.c"
usb_descriptor.c
usb_device.c
usb_endpoint.c
usb_api_board_info.c
usb_api_register.c
usb_api_spiflash.c
"${PATH_HACKRF_FIRMWARE_COMMON}/usb_queue.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/fault_handler.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/w25q80bv.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/rom_iap.c"
"${PATH_HACKRF_FIRMWARE_COMMON}/streaming.c"
)
DeclareTargets()
================================================
FILE: firmware/hackrf_usb/hackrf_usb.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stddef.h>
#include <libopencm3/cm3/vector.h>
#include <libopencm3/lpc43xx/scu.h>
#include <libopencm3/lpc43xx/gpio.h>
#include <libopencm3/lpc43xx/m4/nvic.h>
#include <streaming.h>
#include "usb.h"
#include "usb_standard_request.h"
#include <rom_iap.h>
#include "usb_descriptor.h"
#include "usb_device.h"
#include "usb_endpoint.h"
#include "usb_api_board_info.h"
#include "usb_api_cpld.h"
#include "usb_api_register.h"
#include "usb_api_spiflash.h"
#include "usb_api_transceiver.h"
#include "rf_path.h"
#include "sgpio_isr.h"
#include "usb_bulk_buffer.h"
#include "sgpio.h"
#include "mcp4022.h"
static volatile transceiver_mode_t _transceiver_mode = TRANSCEIVER_MODE_OFF;
static unsigned int phase = 1;
void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
baseband_streaming_disable();
usb_endpoint_disable(&usb_endpoint_bulk_in);
usb_endpoint_disable(&usb_endpoint_bulk_out);
_transceiver_mode = new_transceiver_mode;
if( _transceiver_mode == TRANSCEIVER_MODE_RX ) {
usb_endpoint_init(&usb_endpoint_bulk_in);
usb_bulk_buffer_offset = 0;
phase = 1;
} else if (_transceiver_mode == TRANSCEIVER_MODE_TX) {
//usb_endpoint_init(&usb_endpoint_bulk_out);
}
if( _transceiver_mode != TRANSCEIVER_MODE_OFF ) {
baseband_streaming_enable();
}
}
transceiver_mode_t transceiver_mode(void) {
return _transceiver_mode;
}
usb_request_status_t usb_vendor_request_set_transceiver_mode(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
if( stage == USB_TRANSFER_STAGE_SETUP ) {
switch( endpoint->setup.value ) {
case TRANSCEIVER_MODE_OFF:
case TRANSCEIVER_MODE_RX:
case TRANSCEIVER_MODE_TX:
set_transceiver_mode(endpoint->setup.value);
usb_transfer_schedule_ack(endpoint->in);
return USB_REQUEST_STATUS_OK;
default:
return USB_REQUEST_STATUS_STALL;
}
} else {
return USB_REQUEST_STATUS_OK;
}
}
static const usb_request_handler_fn vendor_request_handler[] = {
NULL,
usb_vendor_request_set_transceiver_mode,
usb_vendor_request_write_adf4158,
usb_vendor_request_read_adf4158,
usb_vendor_request_set_gpio,
usb_vendor_request_clear_gpio,
usb_vendor_request_set_mcp,
usb_vendor_request_set_clock,
NULL,
NULL,
usb_vendor_request_erase_spiflash,
usb_vendor_request_write_spiflash,
usb_vendor_request_read_spiflash,
NULL,
usb_vendor_request_read_board_id,
usb_vendor_request_read_version_string,
NULL,
NULL,
usb_vendor_request_read_partid_serialno,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
static const uint32_t vendor_request_handler_count =
sizeof(vendor_request_handler) / sizeof(vendor_request_handler[0]);
usb_request_status_t usb_vendor_request(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
usb_request_status_t status = USB_REQUEST_STATUS_STALL;
if( endpoint->setup.request < vendor_request_handler_count ) {
usb_request_handler_fn handler = vendor_request_handler[endpoint->setup.request];
if( handler ) {
status = handler(endpoint, stage);
}
}
return status;
}
const usb_request_handlers_t usb_request_handlers = {
.standard = usb_standard_request,
.class = 0,
.vendor = usb_vendor_request,
.reserved = 0,
};
void usb_configuration_changed(
usb_device_t* const device
) {
/* Reset transceiver to idle state until other commands are received */
set_transceiver_mode(TRANSCEIVER_MODE_OFF);
if( device->configuration->number == 1 ) {
// transceiver configuration
cpu_clock_pll1_max_speed();
//gpio_set(PORT_LED1_3, PIN_LED1);
} else if( device->configuration->number == 2 ) {
// CPLD update configuration
cpu_clock_pll1_max_speed();
usb_endpoint_init(&usb_endpoint_bulk_out);
//start_cpld_update = true;
} else {
/* Configuration number equal 0 means usb bus reset. */
cpu_clock_pll1_low_speed();
//gpio_clear(PORT_LED1_3, PIN_LED1);
}
}
void usb_set_descriptor_by_serial_number(void)
{
iap_cmd_res_t iap_cmd_res;
/* Read IAP Serial Number Identification */
iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_SERIAL_NO;
iap_cmd_call(&iap_cmd_res);
if (iap_cmd_res.status_res.status_ret == CMD_SUCCESS) {
usb_descriptor_string_serial_number[0] = USB_DESCRIPTOR_STRING_SERIAL_BUF_LEN;
usb_descriptor_string_serial_number[1] = USB_DESCRIPTOR_TYPE_STRING;
/* 32 characters of serial number, convert to UTF-16LE */
for (size_t i=0; i<USB_DESCRIPTOR_STRING_SERIAL_LEN; i++) {
const uint_fast8_t nibble = (iap_cmd_res.status_res.iap_result[i >> 3] >> (28 - (i & 7) * 4)) & 0xf;
const char c = (nibble > 9) ? ('a' + nibble - 10) : ('0' + nibble);
usb_descriptor_string_serial_number[2 + i * 2] = c;
usb_descriptor_string_serial_number[3 + i * 2] = 0x00;
}
} else {
usb_descriptor_string_serial_number[0] = 2;
usb_descriptor_string_serial_number[1] = USB_DESCRIPTOR_TYPE_STRING;
}
}
int main(void) {
pin_setup();
cpu_clock_init();
usb_set_descriptor_by_serial_number();
gpio_clear(PORT_LED1_3, PIN_LED1);
usb_set_configuration_changed_cb(usb_configuration_changed);
usb_peripheral_reset();
usb_device_init(0, &usb_device);
usb_queue_init(&usb_endpoint_control_out_queue);
usb_queue_init(&usb_endpoint_control_in_queue);
usb_queue_init(&usb_endpoint_bulk_out_queue);
usb_queue_init(&usb_endpoint_bulk_in_queue);
usb_endpoint_init(&usb_endpoint_control_out);
usb_endpoint_init(&usb_endpoint_control_in);
nvic_set_priority(NVIC_USB0_IRQ, 255);
vector_table.irq[NVIC_SGPIO_IRQ] = sgpio_isr_rx;
usb_run(&usb_device);
ssp1_init();
sgpio_configure();
mcp_init();
while(true) {
//gpio_set(PORT_LED1_3, PIN_LED1);
// Set up IN transfer of buffer 0.
if ( usb_bulk_buffer_offset >= 16384
&& phase == 1
&& transceiver_mode() != TRANSCEIVER_MODE_OFF) {
usb_transfer_schedule_block(
(transceiver_mode() == TRANSCEIVER_MODE_RX)
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
&usb_bulk_buffer[0x0000],
0x4000,
NULL, NULL
);
phase = 0;
}
//gpio_clear(PORT_LED1_3, PIN_LED1);
// Set up IN transfer of buffer 1.
if ( usb_bulk_buffer_offset < 16384
&& phase == 0
&& transceiver_mode() != TRANSCEIVER_MODE_OFF) {
usb_transfer_schedule_block(
(transceiver_mode() == TRANSCEIVER_MODE_RX)
? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out,
&usb_bulk_buffer[0x4000],
0x4000-32, // Last 32 bytes are unused
NULL, NULL
);
phase = 1;
}
}
return 0;
}
================================================
FILE: firmware/hackrf_usb/sgpio_isr.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include "sgpio_isr.h"
#include <libopencm3/lpc43xx/sgpio.h>
#include "hackrf_core.h"
#include "usb_bulk_buffer.h"
void sgpio_isr_rx() {
SGPIO_CLR_STATUS_1 = (1 << SGPIO_SLICE_A);
uint32_t* const p = (uint32_t*)&usb_bulk_buffer[usb_bulk_buffer_offset];
__asm__(
"ldr r0, [%[SGPIO_REG_SS], #44]\n\t"
"str r0, [%[p], #0]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #20]\n\t"
"str r0, [%[p], #4]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #40]\n\t"
"str r0, [%[p], #8]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #8]\n\t"
"str r0, [%[p], #12]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #36]\n\t"
"str r0, [%[p], #16]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #16]\n\t"
"str r0, [%[p], #20]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #32]\n\t"
"str r0, [%[p], #24]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #0]\n\t"
"str r0, [%[p], #28]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #24]\n\t"
"str r0, [%[p], #32]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #52]\n\t"
"str r0, [%[p], #36]\n\t"
"ldr r0, [%[SGPIO_REG_SS], #28]\n\t"
"str r0, [%[p], #40]\n\t"
:
: [SGPIO_REG_SS] "l" (SGPIO_PORT_BASE + 0x100),
[p] "l" (p)
: "r0"
);
/*
// D9 - D2
p[0] = SGPIO_REG_SS(SGPIO_SLICE_L);
p[1] = SGPIO_REG_SS(SGPIO_SLICE_F);
p[2] = SGPIO_REG_SS(SGPIO_SLICE_K);
p[3] = SGPIO_REG_SS(SGPIO_SLICE_C);
p[4] = SGPIO_REG_SS(SGPIO_SLICE_J);
p[5] = SGPIO_REG_SS(SGPIO_SLICE_E);
p[6] = SGPIO_REG_SS(SGPIO_SLICE_I);
p[7] = SGPIO_REG_SS(SGPIO_SLICE_A);
// D1
p[8] = SGPIO_REG_SS(SGPIO_SLICE_G);
// D0
p[9] = SGPIO_REG_SS(SGPIO_SLICE_N);
// Sync
p[10] = SGPIO_REG_SS(SGPIO_SLICE_H);
*/
usb_bulk_buffer_offset += 11*4;
if (usb_bulk_buffer_offset > usb_bulk_buffer_size-11*4) {
usb_bulk_buffer_offset = 0;
}
}
================================================
FILE: firmware/hackrf_usb/sgpio_isr.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __SGPIO_ISR_H__
#define __SGPIO_ISR_H__
void sgpio_isr_rx();
#endif/*__SGPIO_ISR_H__*/
================================================
FILE: firmware/hackrf_usb/usb_api_board_info.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "usb_api_board_info.h"
#include <hackrf_core.h>
#include <rom_iap.h>
#include <usb_queue.h>
#include <stddef.h>
#include <string.h>
char version_string[] = VERSION_STRING;
usb_request_status_t usb_vendor_request_read_board_id(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
if (stage == USB_TRANSFER_STAGE_SETUP) {
endpoint->buffer[0] = BOARD_ID;
usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL);
usb_transfer_schedule_ack(endpoint->out);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_read_version_string(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
uint8_t length;
if (stage == USB_TRANSFER_STAGE_SETUP) {
length = (uint8_t)strlen(version_string);
usb_transfer_schedule_block(endpoint->in, version_string, length, NULL, NULL);
usb_transfer_schedule_ack(endpoint->out);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_read_partid_serialno(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
uint8_t length;
read_partid_serialno_t read_partid_serialno;
iap_cmd_res_t iap_cmd_res;
if (stage == USB_TRANSFER_STAGE_SETUP)
{
/* Read IAP Part Number Identification */
iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_PART_ID_NO;
iap_cmd_call(&iap_cmd_res);
if(iap_cmd_res.status_res.status_ret != CMD_SUCCESS)
return USB_REQUEST_STATUS_STALL;
read_partid_serialno.part_id[0] = iap_cmd_res.status_res.iap_result[0];
read_partid_serialno.part_id[1] = iap_cmd_res.status_res.iap_result[1];
/* Read IAP Serial Number Identification */
iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_SERIAL_NO;
iap_cmd_call(&iap_cmd_res);
if(iap_cmd_res.status_res.status_ret != CMD_SUCCESS)
return USB_REQUEST_STATUS_STALL;
read_partid_serialno.serial_no[0] = iap_cmd_res.status_res.iap_result[0];
read_partid_serialno.serial_no[1] = iap_cmd_res.status_res.iap_result[1];
read_partid_serialno.serial_no[2] = iap_cmd_res.status_res.iap_result[2];
read_partid_serialno.serial_no[3] = iap_cmd_res.status_res.iap_result[3];
length = (uint8_t)sizeof(read_partid_serialno_t);
usb_transfer_schedule_block(endpoint->in, &read_partid_serialno, length,
NULL, NULL);
usb_transfer_schedule_ack(endpoint->out);
}
return USB_REQUEST_STATUS_OK;
}
================================================
FILE: firmware/hackrf_usb/usb_api_board_info.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_API_BOARD_INFO_H__
#define __USB_API_BOARD_INFO_H__
#include <stdint.h>
#include <usb_type.h>
#include <usb_request.h>
typedef struct {
uint32_t part_id[2];
uint32_t serial_no[4];
} read_partid_serialno_t;
usb_request_status_t usb_vendor_request_read_board_id(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
usb_request_status_t usb_vendor_request_read_version_string(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
usb_request_status_t usb_vendor_request_read_partid_serialno(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage);
#endif /* end of include guard: __USB_API_BOARD_INFO_H__ */
================================================
FILE: firmware/hackrf_usb/usb_api_cpld.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "usb_api_cpld.h"
#include <libopencm3/lpc43xx/gpio.h>
#include <hackrf_core.h>
#include <cpld_jtag.h>
#include <usb_queue.h>
#include "usb_endpoint.h"
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
volatile bool start_cpld_update = false;
uint8_t cpld_xsvf_buffer[512];
volatile bool cpld_wait = false;
static void cpld_buffer_refilled(void* user_data, unsigned int length)
{
(void)user_data;
(void)length;
cpld_wait = false;
}
static void refill_cpld_buffer(void)
{
cpld_wait = true;
usb_transfer_schedule(
&usb_endpoint_bulk_out,
cpld_xsvf_buffer,
sizeof(cpld_xsvf_buffer),
cpld_buffer_refilled,
NULL
);
// Wait until transfer finishes
while (cpld_wait);
}
void cpld_update(void)
{
#define WAIT_LOOP_DELAY (6000000)
#define ALL_LEDS (PIN_LED1|PIN_LED2|PIN_LED3)
int i;
int error;
usb_queue_flush_endpoint(&usb_endpoint_bulk_in);
usb_queue_flush_endpoint(&usb_endpoint_bulk_out);
refill_cpld_buffer();
error = cpld_jtag_program(sizeof(cpld_xsvf_buffer),
cpld_xsvf_buffer,
refill_cpld_buffer);
if(error == 0)
{
/* blink LED1, LED2, and LED3 on success */
while (1)
{
gpio_set(PORT_LED1_3, ALL_LEDS); /* LEDs on */
for (i = 0; i < WAIT_LOOP_DELAY; i++) /* Wait a bit. */
__asm__("nop");
gpio_clear(PORT_LED1_3, ALL_LEDS); /* LEDs off */
for (i = 0; i < WAIT_LOOP_DELAY; i++) /* Wait a bit. */
__asm__("nop");
}
}else
{
/* LED3 (Red) steady on error */
gpio_set(PORT_LED1_3, PIN_LED3); /* LEDs on */
while (1);
}
}
================================================
FILE: firmware/hackrf_usb/usb_api_cpld.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_API_CPLD_H__
#define __USB_API_CPLD_H__
#include <stdbool.h>
extern volatile bool start_cpld_update;
void cpld_update(void);
#endif /* end of include guard: __USB_API_CPLD_H__ */
================================================
FILE: firmware/hackrf_usb/usb_api_register.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "usb_api_register.h"
#include <libopencm3/lpc43xx/gpio.h>
#include "hackrf_core.h"
#include <usb_queue.h>
#include "rf_path.h"
#include <stddef.h>
#include <stdint.h>
#include "sgpio.h"
#include "sgpio_isr.h"
#include "mcp4022.h"
/*
usb_request_status_t usb_vendor_request_write_spiflash(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
uint32_t addr = 0;
uint16_t len = 0;
//FIXME This should refuse to run if executing from SPI flash.
if (stage == USB_TRANSFER_STAGE_SETUP) {
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES)) {
return USB_REQUEST_STATUS_STALL;
} else {
usb_transfer_schedule_block(endpoint->out, &spiflash_buffer[0], len,
NULL, NULL);
w25q80bv_setup();
return USB_REQUEST_STATUS_OK;
}
} else if (stage == USB_TRANSFER_STAGE_DATA) {
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES)) {
return USB_REQUEST_STATUS_STALL;
} else {
w25q80bv_program(addr, len, &spiflash_buffer[0]);
usb_transfer_schedule_ack(endpoint->in);
//FIXME probably should undo w25q80bv_setup()
return USB_REQUEST_STATUS_OK;
}
} else {
return USB_REQUEST_STATUS_OK;
}
}
*/
usb_request_status_t usb_vendor_request_write_adf4158(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index);
if( stage == USB_TRANSFER_STAGE_SETUP ) {
adf4158_write_register(data);
usb_transfer_schedule_ack(endpoint->in);
return USB_REQUEST_STATUS_OK;
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_read_adf4158(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
if( stage == USB_TRANSFER_STAGE_SETUP ) {
const uint32_t value = adf4158_read_register();
endpoint->buffer[0] = (value >> 8*3) & 0xFF;
endpoint->buffer[1] = (value >> 8*2) & 0xFF;
endpoint->buffer[2] = (value >> 8*1) & 0xFF;
endpoint->buffer[3] = (value >> 8*0) & 0xFF;
usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 4,
NULL, NULL);
usb_transfer_schedule_ack(endpoint->out);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_set_mcp(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
uint32_t data = endpoint->setup.index;
if( stage == USB_TRANSFER_STAGE_SETUP ) {
if (data > MCP_MAX_VALUE) {
return USB_REQUEST_STATUS_STALL;
} else {
mcp_set(data);
usb_transfer_schedule_ack(endpoint->in);
}
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_set_gpio(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index);
if( stage == USB_TRANSFER_STAGE_SETUP ) {
if (data & BIT0) {
enable_adf4158();
}
if (data & BIT1) {
enable_adc();
}
if (data & BIT2) {
enable_pa();
}
if (data & BIT3) {
enable_mixer();
}
if (data & BIT4) {
gpio_set(PORT_LED1_3, PIN_LED1);
}
if (data & BIT5) {
sgpio_test_interface();
}
usb_transfer_schedule_ack(endpoint->in);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_clear_gpio(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index);
if( stage == USB_TRANSFER_STAGE_SETUP ) {
if (data & BIT0) {
disable_adf4158();
}
if (data & BIT1) {
disable_adc();
}
if (data & BIT2) {
disable_pa();
}
if (data & BIT3) {
disable_mixer();
}
if (data & BIT4) {
gpio_clear(PORT_LED1_3, PIN_LED1);
}
usb_transfer_schedule_ack(endpoint->in);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_set_clock(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
// Configures ADC clock
if( stage == USB_TRANSFER_STAGE_SETUP ) {
if (endpoint->setup.value > 4095) {
return USB_REQUEST_STATUS_STALL;
}
sgpio_configure_clock(endpoint->setup.value, endpoint->setup.index);
usb_transfer_schedule_ack(endpoint->in);
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_set_trigger(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
) {
if( stage == USB_TRANSFER_STAGE_SETUP ) {
//set_trigger(endpoint->setup.value, endpoint->setup.index);
usb_transfer_schedule_ack(endpoint->in);
}
return USB_REQUEST_STATUS_OK;
}
================================================
FILE: firmware/hackrf_usb/usb_api_register.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_API_REGISTER_H__
#define __USB_API_REGISTER_H__
#include <usb_type.h>
#include <usb_request.h>
usb_request_status_t usb_vendor_request_write_adf4158(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
usb_request_status_t usb_vendor_request_read_adf4158(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
usb_request_status_t usb_vendor_request_set_gpio(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
usb_request_status_t usb_vendor_request_clear_gpio(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
usb_request_status_t usb_vendor_request_set_mcp(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
usb_request_status_t usb_vendor_request_set_clock(
usb_endpoint_t* const endpoint,
const usb_transfer_stage_t stage
);
#endif /* end of include guard: __USB_API_REGISTER_H__ */
================================================
FILE: firmware/hackrf_usb/usb_api_spiflash.c
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "usb_api_spiflash.h"
#include "usb_queue.h"
#include <stddef.h>
#include <w25q80bv.h>
uint8_t spiflash_buffer[W25Q80BV_PAGE_LEN];
usb_request_status_t usb_vendor_request_erase_spiflash(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
//FIXME This should refuse to run if executing from SPI flash.
if (stage == USB_TRANSFER_STAGE_SETUP) {
w25q80bv_setup();
/* only chip erase is implemented */
w25q80bv_chip_erase();
usb_transfer_schedule_ack(endpoint->in);
//FIXME probably should undo w25q80bv_setup()
}
return USB_REQUEST_STATUS_OK;
}
usb_request_status_t usb_vendor_request_write_spiflash(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
uint32_t addr = 0;
uint16_t len = 0;
//FIXME This should refuse to run if executing from SPI flash.
if (stage == USB_TRANSFER_STAGE_SETUP) {
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES)) {
return USB_REQUEST_STATUS_STALL;
} else {
usb_transfer_schedule_block(endpoint->out, &spiflash_buffer[0], len,
NULL, NULL);
w25q80bv_setup();
return USB_REQUEST_STATUS_OK;
}
} else if (stage == USB_TRANSFER_STAGE_DATA) {
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
/* This check is redundant but makes me feel better. */
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES)) {
return USB_REQUEST_STATUS_STALL;
} else {
w25q80bv_program(addr, len, &spiflash_buffer[0]);
usb_transfer_schedule_ack(endpoint->in);
//FIXME probably should undo w25q80bv_setup()
return USB_REQUEST_STATUS_OK;
}
} else {
return USB_REQUEST_STATUS_OK;
}
}
usb_request_status_t usb_vendor_request_read_spiflash(
usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage)
{
uint32_t i;
uint32_t addr;
uint16_t len;
//uint8_t* u8_addr_pt;
if (stage == USB_TRANSFER_STAGE_SETUP)
{
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES)) {
return USB_REQUEST_STATUS_STALL;
} else {
/* TODO flush SPIFI "cache" before to read the SPIFI memory */
for(i=0;i<W25Q80BV_PAGE_LEN;i++) {
spiflash_buffer[i] = 0;
}
w25q80bv_setup();
w25q80bv_read_page(addr, len, spiflash_buffer);
/*u8_addr_pt = (uint8_t*)(addr + SPIFI_DATA_UNCACHED_BASE);
for(i=0; i<len; i++)
{
spiflash_buffer[i] = u8_addr_pt[i];
}
*/
usb_transfer_schedule_block(endpoint->in, &spiflash_buffer[0], len,
NULL, NULL);
return USB_REQUEST_STATUS_OK;
}
} else if (stage == USB_TRANSFER_STAGE_DATA)
{
addr = (endpoint->setup.value << 16) | endpoint->setup.index;
len = endpoint->setup.length;
/* This check is redundant but makes me feel better. */
if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES)
|| ((addr + len) > W25Q80BV_NUM_BYTES))
{
return USB_REQUEST_STATUS_STALL;
} else
{
usb_transfer_schedule_ack(endpoint->out);
return USB_REQUEST_STATUS_OK;
}
} else
{
return USB_REQUEST_STATUS_OK;
}
}
================================================
FILE: firmware/hackrf_usb/usb_api_spiflash.h
================================================
/*
* Copyright 2012 Jared Boone
* Copyright 2013 Benjamin Vernoux
*
* This file is part of HackRF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef __USB_API_SPIFLASH_H__
#define __USB_API_SPIFLASH_H__
#include <usb_type.h>
#include <usb_request.h>
usb_request_status_
gitextract_b54prupg/
├── .gitignore
├── README.md
├── firmware/
│ ├── CMakeLists.txt
│ ├── COPYING
│ ├── blinky/
│ │ ├── CMakeLists.txt
│ │ └── blinky.c
│ ├── cmake_install.cmake
│ ├── common/
│ │ ├── LPC4320_M4_memory.ld
│ │ ├── LPC4330_M4_memory.ld
│ │ ├── LPC43xx_M0_memory.ld
│ │ ├── LPC43xx_M4_M0_image_from_text.ld
│ │ ├── LPC43xx_M4_memory.ld
│ │ ├── bitband.c
│ │ ├── bitband.h
│ │ ├── fault_handler.c
│ │ ├── fault_handler.h
│ │ ├── gpdma.c
│ │ ├── gpdma.h
│ │ ├── hackrf_core.c
│ │ ├── hackrf_core.h
│ │ ├── m0_bin.s.cmake
│ │ ├── m0_sleep.c
│ │ ├── mcp4022.c
│ │ ├── mcp4022.h
│ │ ├── rf_path.c
│ │ ├── rf_path.h
│ │ ├── rom_iap.c
│ │ ├── rom_iap.h
│ │ ├── sgpio.c
│ │ ├── sgpio.h
│ │ ├── streaming.c
│ │ ├── streaming.h
│ │ ├── usb.c
│ │ ├── usb.h
│ │ ├── usb_queue.c
│ │ ├── usb_queue.h
│ │ ├── usb_request.c
│ │ ├── usb_request.h
│ │ ├── usb_standard_request.c
│ │ ├── usb_standard_request.h
│ │ ├── usb_type.h
│ │ ├── w25q80bv.c
│ │ └── w25q80bv.h
│ ├── hackrf-common.cmake
│ ├── hackrf_usb/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_usb.c
│ │ ├── sgpio_isr.c
│ │ ├── sgpio_isr.h
│ │ ├── usb_api_board_info.c
│ │ ├── usb_api_board_info.h
│ │ ├── usb_api_cpld.c
│ │ ├── usb_api_cpld.h
│ │ ├── usb_api_register.c
│ │ ├── usb_api_register.h
│ │ ├── usb_api_spiflash.c
│ │ ├── usb_api_spiflash.h
│ │ ├── usb_api_transceiver.c
│ │ ├── usb_api_transceiver.h
│ │ ├── usb_bulk_buffer.c
│ │ ├── usb_bulk_buffer.h
│ │ ├── usb_descriptor.c
│ │ ├── usb_descriptor.h
│ │ ├── usb_device.c
│ │ ├── usb_device.h
│ │ ├── usb_endpoint.c
│ │ └── usb_endpoint.h
│ ├── libopencm3/
│ │ ├── .gitignore
│ │ ├── COPYING.GPL3
│ │ ├── COPYING.LGPL3
│ │ ├── HACKING
│ │ ├── HACKING_COMMON_DOC
│ │ ├── Makefile
│ │ ├── README
│ │ ├── doc/
│ │ │ ├── Doxyfile
│ │ │ ├── Doxyfile_common
│ │ │ ├── DoxygenLayout.xml
│ │ │ ├── HACKING
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── cm3/
│ │ │ │ ├── Doxyfile
│ │ │ │ └── DoxygenLayout_cm3.xml
│ │ │ ├── efm32g/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32g.xml
│ │ │ │ └── header_efm32g.tex
│ │ │ ├── efm32gg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32gg.xml
│ │ │ │ └── header_efm32gg.tex
│ │ │ ├── efm32lg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32lg.xml
│ │ │ │ └── header_efm32lg.tex
│ │ │ ├── efm32tg/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_efm32tg.xml
│ │ │ │ └── header_efm32tg.tex
│ │ │ ├── index.html
│ │ │ ├── lm3s/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lm3s.xml
│ │ │ │ └── header_lm3s.tex
│ │ │ ├── lm4f/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lm4f.xml
│ │ │ │ └── header_lm4f.tex
│ │ │ ├── lpc13xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc13xx.xml
│ │ │ │ └── header_lpc13xx.tex
│ │ │ ├── lpc17xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc17xx.xml
│ │ │ │ └── header_lpc17xx.tex
│ │ │ ├── lpc43xx/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_lpc43xx.xml
│ │ │ │ └── header_lpc43xx.tex
│ │ │ ├── stm32f0/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f0.xml
│ │ │ │ ├── header_stm32f0.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f1/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f1.xml
│ │ │ │ ├── header_stm32f1.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f2/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f2.xml
│ │ │ │ ├── header_stm32f2.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f3/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f3.xml
│ │ │ │ ├── header_stm32f3.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32f4/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32f4.xml
│ │ │ │ ├── header_stm32f4.tex
│ │ │ │ └── index.html
│ │ │ ├── stm32l1/
│ │ │ │ ├── Doxyfile
│ │ │ │ ├── Doxyfile_latex
│ │ │ │ ├── DoxygenLayout_stm32l1.xml
│ │ │ │ ├── header_stm32l1.tex
│ │ │ │ └── index.html
│ │ │ └── usb/
│ │ │ ├── Doxyfile
│ │ │ ├── Doxyfile_latex
│ │ │ ├── DoxygenLayout_usb.xml
│ │ │ └── header_usb.tex
│ │ ├── include/
│ │ │ ├── libopencm3/
│ │ │ │ ├── cm3/
│ │ │ │ │ ├── assert.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── cortex.h
│ │ │ │ │ ├── doc-cm3.h
│ │ │ │ │ ├── fpb.h
│ │ │ │ │ ├── itm.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── mpu.h
│ │ │ │ │ ├── scb.h
│ │ │ │ │ ├── scs.h
│ │ │ │ │ ├── sync.h
│ │ │ │ │ ├── systick.h
│ │ │ │ │ ├── tpiu.h
│ │ │ │ │ └── vector.h
│ │ │ │ ├── docmain.dox
│ │ │ │ ├── efm32/
│ │ │ │ │ ├── efm32g/
│ │ │ │ │ │ ├── doc-efm32g.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32gg/
│ │ │ │ │ │ ├── doc-efm32gg.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32lg/
│ │ │ │ │ │ ├── doc-efm32lg.h
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── efm32tg/
│ │ │ │ │ │ ├── doc-efm32tg.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── license.dox
│ │ │ │ ├── lm3s/
│ │ │ │ │ ├── doc-lm3s.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ └── systemcontrol.h
│ │ │ │ ├── lm4f/
│ │ │ │ │ ├── doc-lm4f.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── rcc.h
│ │ │ │ │ ├── systemcontrol.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ └── usb.h
│ │ │ │ ├── lpc13xx/
│ │ │ │ │ ├── doc-lpc13xx.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── lpc17xx/
│ │ │ │ │ ├── doc-lpc17xx.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── irq.yaml
│ │ │ │ │ └── memorymap.h
│ │ │ │ ├── lpc43xx/
│ │ │ │ │ ├── adc.h
│ │ │ │ │ ├── atimer.h
│ │ │ │ │ ├── ccu.h
│ │ │ │ │ ├── cgu.h
│ │ │ │ │ ├── creg.h
│ │ │ │ │ ├── doc-lpc43xx.h
│ │ │ │ │ ├── eventrouter.h
│ │ │ │ │ ├── gima.h
│ │ │ │ │ ├── gpdma.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── i2c.h
│ │ │ │ │ ├── i2s.h
│ │ │ │ │ ├── ipc.h
│ │ │ │ │ ├── m0/
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── m4/
│ │ │ │ │ │ └── irq.yaml
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── rgu.h
│ │ │ │ │ ├── ritimer.h
│ │ │ │ │ ├── rtc.h
│ │ │ │ │ ├── scu.h
│ │ │ │ │ ├── sdio.h
│ │ │ │ │ ├── sgpio.h
│ │ │ │ │ ├── spi.h
│ │ │ │ │ ├── spifi.h
│ │ │ │ │ ├── ssp.h
│ │ │ │ │ ├── timer.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ ├── usb.h
│ │ │ │ │ └── wwdt.h
│ │ │ │ ├── sam/
│ │ │ │ │ ├── 3n/
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ ├── 3x/
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ └── memorymap.h
│ │ │ │ │ ├── eefc.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── pio.h
│ │ │ │ │ ├── pmc.h
│ │ │ │ │ ├── pwm.h
│ │ │ │ │ ├── tc.h
│ │ │ │ │ ├── uart.h
│ │ │ │ │ ├── usart.h
│ │ │ │ │ └── wdt.h
│ │ │ │ ├── stm32/
│ │ │ │ │ ├── adc.h
│ │ │ │ │ ├── can.h
│ │ │ │ │ ├── cec.h
│ │ │ │ │ ├── common/
│ │ │ │ │ │ ├── crc_common_all.h
│ │ │ │ │ │ ├── crypto_common_f24.h
│ │ │ │ │ │ ├── dac_common_all.h
│ │ │ │ │ │ ├── dma_common_f24.h
│ │ │ │ │ │ ├── dma_common_l1f013.h
│ │ │ │ │ │ ├── exti_common_all.h
│ │ │ │ │ │ ├── exti_common_l1f24.h
│ │ │ │ │ │ ├── flash_common_f234.h
│ │ │ │ │ │ ├── flash_common_f24.h
│ │ │ │ │ │ ├── gpio_common_all.h
│ │ │ │ │ │ ├── gpio_common_f234.h
│ │ │ │ │ │ ├── gpio_common_f24.h
│ │ │ │ │ │ ├── hash_common_f24.h
│ │ │ │ │ │ ├── i2c_common_all.h
│ │ │ │ │ │ ├── i2c_common_f24.h
│ │ │ │ │ │ ├── iwdg_common_all.h
│ │ │ │ │ │ ├── pwr_common_all.h
│ │ │ │ │ │ ├── rng_common_f24.h
│ │ │ │ │ │ ├── rtc_common_l1f024.h
│ │ │ │ │ │ ├── spi_common_all.h
│ │ │ │ │ │ ├── spi_common_f124.h
│ │ │ │ │ │ ├── spi_common_f24.h
│ │ │ │ │ │ ├── syscfg_common_l1f234.h
│ │ │ │ │ │ ├── timer_common_all.h
│ │ │ │ │ │ ├── timer_common_f24.h
│ │ │ │ │ │ ├── usart_common_all.h
│ │ │ │ │ │ ├── usart_common_f124.h
│ │ │ │ │ │ └── usart_common_f24.h
│ │ │ │ │ ├── comparator.h
│ │ │ │ │ ├── crc.h
│ │ │ │ │ ├── crypto.h
│ │ │ │ │ ├── dac.h
│ │ │ │ │ ├── dbgmcu.h
│ │ │ │ │ ├── desig.h
│ │ │ │ │ ├── dma.h
│ │ │ │ │ ├── exti.h
│ │ │ │ │ ├── f0/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── cec.h
│ │ │ │ │ │ ├── comparator.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f0.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ ├── tsc.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f1/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── bkp.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f1.h
│ │ │ │ │ │ ├── ethernet.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f2/
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── crypto.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f2.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── hash.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rng.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f3/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f3.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── f4/
│ │ │ │ │ │ ├── adc.h
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── crypto.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32f4.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── hash.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rng.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── flash.h
│ │ │ │ │ ├── fsmc.h
│ │ │ │ │ ├── gpio.h
│ │ │ │ │ ├── hash.h
│ │ │ │ │ ├── i2c.h
│ │ │ │ │ ├── iwdg.h
│ │ │ │ │ ├── l1/
│ │ │ │ │ │ ├── crc.h
│ │ │ │ │ │ ├── dac.h
│ │ │ │ │ │ ├── dma.h
│ │ │ │ │ │ ├── doc-stm32l1.h
│ │ │ │ │ │ ├── exti.h
│ │ │ │ │ │ ├── flash.h
│ │ │ │ │ │ ├── gpio.h
│ │ │ │ │ │ ├── i2c.h
│ │ │ │ │ │ ├── irq.yaml
│ │ │ │ │ │ ├── iwdg.h
│ │ │ │ │ │ ├── memorymap.h
│ │ │ │ │ │ ├── pwr.h
│ │ │ │ │ │ ├── rcc.h
│ │ │ │ │ │ ├── rtc.h
│ │ │ │ │ │ ├── spi.h
│ │ │ │ │ │ ├── syscfg.h
│ │ │ │ │ │ ├── timer.h
│ │ │ │ │ │ └── usart.h
│ │ │ │ │ ├── memorymap.h
│ │ │ │ │ ├── otg_fs.h
│ │ │ │ │ ├── otg_hs.h
│ │ │ │ │ ├── pwr.h
│ │ │ │ │ ├── rcc.h
│ │ │ │ │ ├── rtc.h
│ │ │ │ │ ├── sdio.h
│ │ │ │ │ ├── spi.h
│ │ │ │ │ ├── syscfg.h
│ │ │ │ │ ├── timer.h
│ │ │ │ │ ├── tools.h
│ │ │ │ │ ├── tsc.h
│ │ │ │ │ ├── usart.h
│ │ │ │ │ ├── usb.h
│ │ │ │ │ ├── usb_desc.h
│ │ │ │ │ └── wwdg.h
│ │ │ │ └── usb/
│ │ │ │ ├── cdc.h
│ │ │ │ ├── dfu.h
│ │ │ │ ├── doc-usb.h
│ │ │ │ ├── hid.h
│ │ │ │ ├── usbd.h
│ │ │ │ └── usbstd.h
│ │ │ └── libopencmsis/
│ │ │ ├── core_cm3.h
│ │ │ └── dispatch/
│ │ │ └── irqhandlers.h
│ │ ├── ld/
│ │ │ └── devices.data
│ │ ├── lib/
│ │ │ ├── Makefile.include
│ │ │ ├── cm3/
│ │ │ │ ├── assert.c
│ │ │ │ ├── nvic.c
│ │ │ │ ├── scb.c
│ │ │ │ ├── sync.c
│ │ │ │ ├── systick.c
│ │ │ │ └── vector.c
│ │ │ ├── dispatch/
│ │ │ │ └── vector_chipset.c
│ │ │ ├── efm32/
│ │ │ │ ├── efm32g/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_efm32g.ld
│ │ │ │ │ └── libopencm3_efm32g880f128.ld
│ │ │ │ ├── efm32gg/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_efm32gg.ld
│ │ │ │ │ └── libopencm3_efm32gg990f1024.ld
│ │ │ │ ├── efm32lg/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_efm32lg.ld
│ │ │ │ └── efm32tg/
│ │ │ │ ├── Makefile
│ │ │ │ ├── libopencm3_efm32tg.ld
│ │ │ │ └── libopencm3_efm32tg840f32.ld
│ │ │ ├── linker.ld.S
│ │ │ ├── lm3s/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lm3s.ld
│ │ │ ├── lm4f/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ ├── libopencm3_lm4f.ld
│ │ │ │ ├── rcc.c
│ │ │ │ ├── systemcontrol.c
│ │ │ │ ├── uart.c
│ │ │ │ └── usb_lm4f.c
│ │ │ ├── lpc13xx/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lpc13xx.ld
│ │ │ ├── lpc17xx/
│ │ │ │ ├── Makefile
│ │ │ │ ├── gpio.c
│ │ │ │ └── libopencm3_lpc17xx.ld
│ │ │ ├── lpc43xx/
│ │ │ │ ├── gpio.c
│ │ │ │ ├── i2c.c
│ │ │ │ ├── ipc.c
│ │ │ │ ├── m0/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_lpc43xx_m0.ld
│ │ │ │ ├── m4/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── libopencm3_lpc43xx.ld
│ │ │ │ │ ├── libopencm3_lpc43xx_ram_only.ld
│ │ │ │ │ ├── libopencm3_lpc43xx_rom_to_ram.ld
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ ├── scu.c
│ │ │ │ ├── ssp.c
│ │ │ │ ├── timer.c
│ │ │ │ └── uart.c
│ │ │ ├── lpc43xx_m0/
│ │ │ │ ├── Makefile
│ │ │ │ └── vector.c
│ │ │ ├── sam/
│ │ │ │ ├── 3n/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_sam3n.ld
│ │ │ │ ├── 3x/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ └── libopencm3_sam3x.ld
│ │ │ │ └── common/
│ │ │ │ ├── gpio.c
│ │ │ │ ├── pmc.c
│ │ │ │ └── usart.c
│ │ │ ├── stm32/
│ │ │ │ ├── can.c
│ │ │ │ ├── common/
│ │ │ │ │ ├── crc_common_all.c
│ │ │ │ │ ├── crypto_common_f24.c
│ │ │ │ │ ├── dac_common_all.c
│ │ │ │ │ ├── dma_common_f24.c
│ │ │ │ │ ├── dma_common_l1f013.c
│ │ │ │ │ ├── exti_common_all.c
│ │ │ │ │ ├── flash_common_f234.c
│ │ │ │ │ ├── flash_common_f24.c
│ │ │ │ │ ├── gpio_common_all.c
│ │ │ │ │ ├── gpio_common_f0234.c
│ │ │ │ │ ├── hash_common_f24.c
│ │ │ │ │ ├── i2c_common_all.c
│ │ │ │ │ ├── iwdg_common_all.c
│ │ │ │ │ ├── pwr_common_all.c
│ │ │ │ │ ├── rtc_common_l1f024.c
│ │ │ │ │ ├── spi_common_all.c
│ │ │ │ │ ├── spi_common_f124.c
│ │ │ │ │ ├── timer_common_all.c
│ │ │ │ │ ├── timer_common_f234.c
│ │ │ │ │ ├── timer_common_f24.c
│ │ │ │ │ ├── usart_common_all.c
│ │ │ │ │ └── usart_common_f124.c
│ │ │ │ ├── desig.c
│ │ │ │ ├── f0/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── comparator.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f0.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── syscfg.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f1/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── ethernet.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f1.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── stm32f100x4.ld
│ │ │ │ │ ├── stm32f100x6.ld
│ │ │ │ │ ├── stm32f100x8.ld
│ │ │ │ │ ├── stm32f100xb.ld
│ │ │ │ │ ├── stm32f100xc.ld
│ │ │ │ │ ├── stm32f100xd.ld
│ │ │ │ │ ├── stm32f100xe.ld
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f2/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f2.ld
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ └── usart.c
│ │ │ │ ├── f3/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── flash.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f3.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── timer.c
│ │ │ │ │ ├── usart.c
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ ├── f4/
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── adc.c
│ │ │ │ │ ├── crc.c
│ │ │ │ │ ├── crypto.c
│ │ │ │ │ ├── dac.c
│ │ │ │ │ ├── dma.c
│ │ │ │ │ ├── gpio.c
│ │ │ │ │ ├── i2c.c
│ │ │ │ │ ├── iwdg.c
│ │ │ │ │ ├── libopencm3_stm32f4.ld
│ │ │ │ │ ├── pwr.c
│ │ │ │ │ ├── rcc.c
│ │ │ │ │ ├── rtc.c
│ │ │ │ │ ├── spi.c
│ │ │ │ │ ├── stm32f405x6.ld
│ │ │ │ │ ├── timer.c
│ │ │ │ │ ├── usart.c
│ │ │ │ │ └── vector_chipset.c
│ │ │ │ └── l1/
│ │ │ │ ├── Makefile
│ │ │ │ ├── crc.c
│ │ │ │ ├── dac.c
│ │ │ │ ├── dma.c
│ │ │ │ ├── flash.c
│ │ │ │ ├── gpio.c
│ │ │ │ ├── i2c.c
│ │ │ │ ├── iwdg.c
│ │ │ │ ├── libopencm3_stm32l1.ld
│ │ │ │ ├── pwr.c
│ │ │ │ ├── rcc.c
│ │ │ │ ├── rtc.c
│ │ │ │ ├── spi.c
│ │ │ │ ├── stm32l15xx6.ld
│ │ │ │ ├── stm32l15xx8.ld
│ │ │ │ ├── stm32l15xxb.ld
│ │ │ │ ├── stm32l15xxc.ld
│ │ │ │ ├── stm32l15xxd.ld
│ │ │ │ ├── timer.c
│ │ │ │ └── usart.c
│ │ │ └── usb/
│ │ │ ├── usb.c
│ │ │ ├── usb_control.c
│ │ │ ├── usb_f103.c
│ │ │ ├── usb_f107.c
│ │ │ ├── usb_f207.c
│ │ │ ├── usb_fx07_common.c
│ │ │ ├── usb_fx07_common.h
│ │ │ ├── usb_private.h
│ │ │ └── usb_standard.c
│ │ ├── locm3.sublime-project
│ │ └── scripts/
│ │ ├── black_magic_probe_debug.scr
│ │ ├── black_magic_probe_flash.scr
│ │ ├── checkpatch.pl
│ │ ├── data/
│ │ │ └── lpc43xx/
│ │ │ ├── README
│ │ │ ├── adc.csv
│ │ │ ├── adc.yaml
│ │ │ ├── atimer.csv
│ │ │ ├── atimer.yaml
│ │ │ ├── ccu.csv
│ │ │ ├── ccu.yaml
│ │ │ ├── cgu.csv
│ │ │ ├── cgu.yaml
│ │ │ ├── creg.csv
│ │ │ ├── creg.yaml
│ │ │ ├── csv2yaml.py
│ │ │ ├── eventrouter.csv
│ │ │ ├── eventrouter.yaml
│ │ │ ├── gen.py
│ │ │ ├── gima.csv
│ │ │ ├── gima.yaml
│ │ │ ├── gpdma.csv
│ │ │ ├── gpdma.yaml
│ │ │ ├── gpio.csv
│ │ │ ├── gpio.yaml
│ │ │ ├── i2c.csv
│ │ │ ├── i2c.yaml
│ │ │ ├── i2s.csv
│ │ │ ├── i2s.yaml
│ │ │ ├── rgu.csv
│ │ │ ├── rgu.yaml
│ │ │ ├── ritimer.csv
│ │ │ ├── ritimer.yaml
│ │ │ ├── rtc.csv
│ │ │ ├── rtc.yaml
│ │ │ ├── scu.csv
│ │ │ ├── scu.yaml
│ │ │ ├── sgpio.csv
│ │ │ ├── sgpio.yaml
│ │ │ ├── spi.csv
│ │ │ ├── spi.yaml
│ │ │ ├── spifi.csv
│ │ │ ├── spifi.yaml
│ │ │ ├── ssp.csv
│ │ │ ├── ssp.yaml
│ │ │ ├── usb.csv
│ │ │ ├── usb.yaml
│ │ │ └── yaml_odict.py
│ │ ├── genlink.awk
│ │ ├── irq2nvic_h
│ │ └── lpcvtcksum
│ ├── m0_bin.s
│ └── toolchain-arm-cortex-m.cmake
├── hardware/
│ ├── README.md
│ ├── fmcw2/
│ │ ├── fmcw2-cache.lib
│ │ ├── fmcw2-rescue.lib
│ │ ├── fmcw2.kicad_pcb
│ │ ├── fmcw2.pro
│ │ ├── fmcw2.sch
│ │ └── libs/
│ │ └── fmcw2.lib
│ └── fmcw2_mcu/
│ ├── fmcw2_mcu-cache.lib
│ ├── fmcw2_mcu-rescue.lib
│ ├── fmcw2_mcu.kicad_pcb
│ ├── fmcw2_mcu.pro
│ └── fmcw2_mcu.sch
├── host/
│ ├── CMakeLists.txt
│ ├── COPYING
│ ├── cmake/
│ │ ├── cmake_uninstall.cmake.in
│ │ └── modules/
│ │ ├── FindLIBHACKRF.cmake
│ │ ├── FindThreads.cmake
│ │ └── FindUSB1.cmake
│ ├── hackrf-tools/
│ │ ├── CMakeLists.txt
│ │ ├── Readme.md
│ │ ├── getopt/
│ │ │ ├── getopt.c
│ │ │ └── getopt.h
│ │ └── src/
│ │ ├── CMakeLists.txt
│ │ ├── hackrf_info.c
│ │ ├── hackrf_spiflash.c
│ │ └── hackrf_transfer.c
│ └── libhackrf/
│ ├── 53-hackrf.rules
│ ├── 53-hackrf.rules.in
│ ├── CMakeLists.txt
│ ├── libhackrf.pc.in
│ └── src/
│ ├── CMakeLists.txt
│ ├── hackrf.c
│ └── hackrf.h
└── processing/
├── analysis.py
├── bicycle_sar.py
├── filter.py
├── fir/
│ ├── Makefile
│ ├── fir.c
│ └── taps.h
├── sar_autofocus.py
├── sar_process.py
└── sync_analysis.py
SYMBOL INDEX (1778 symbols across 183 files)
FILE: firmware/blinky/blinky.c
function main (line 29) | int main(void)
FILE: firmware/common/bitband.c
function peripheral_bitband_set (line 32) | void peripheral_bitband_set(volatile void* const peripheral_address, con...
function peripheral_bitband_clear (line 37) | void peripheral_bitband_clear(volatile void* const peripheral_address, c...
function peripheral_bitband_get (line 42) | uint32_t peripheral_bitband_get(volatile void* const peripheral_address,...
FILE: firmware/common/fault_handler.c
type hard_fault_stack_t (line 27) | typedef struct
function hard_fault_handler (line 39) | __attribute__((naked))
function hard_fault_handler_c (line 50) | __attribute__((used)) void hard_fault_handler_c(uint32_t* args)
function mem_manage_handler (line 76) | void mem_manage_handler() {
function bus_fault_handler (line 80) | void bus_fault_handler() {
function usage_fault_handler (line 84) | void usage_fault_handler() {
FILE: firmware/common/fault_handler.h
type armv7m_scb_t (line 32) | typedef struct armv7m_scb_t armv7m_scb_t;
type armv7m_scb_t (line 33) | struct armv7m_scb_t {
FILE: firmware/common/gpdma.c
function gpdma_controller_enable (line 26) | void gpdma_controller_enable() {
function gpdma_channel_enable (line 31) | void gpdma_channel_enable(const uint_fast8_t channel) {
function gpdma_channel_disable (line 35) | void gpdma_channel_disable(const uint_fast8_t channel) {
function gpdma_channel_interrupt_tc_clear (line 40) | void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel) {
function gpdma_channel_interrupt_error_clear (line 44) | void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel) {
function gpdma_lli_enable_interrupt (line 48) | void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli) {
function gpdma_lli_create_loop (line 52) | void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_coun...
function gpdma_lli_create_oneshot (line 59) | void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_c...
FILE: firmware/common/hackrf_core.c
function delay (line 35) | void delay(uint32_t duration)
function cpu_clock_init (line 46) | void cpu_clock_init(void)
function cpu_clock_pll1_low_speed (line 135) | void cpu_clock_pll1_low_speed(void)
function cpu_clock_pll1_max_speed (line 170) | void cpu_clock_pll1_max_speed(void)
function ssp1_init (line 219) | void ssp1_init(void)
function ssp1_set_mode_16bit (line 235) | void ssp1_set_mode_16bit(void)
function ssp1_set_mode_8bit (line 258) | void ssp1_set_mode_8bit(void)
function pin_setup (line 281) | void pin_setup(void) {
FILE: firmware/common/hackrf_core.h
type transceiver_mode_t (line 168) | typedef enum {
FILE: firmware/common/m0_sleep.c
function main (line 22) | int main() {
FILE: firmware/common/mcp4022.c
function mcp_init (line 26) | void mcp_init(void) {
function wait_us (line 43) | static void wait_us(uint32_t wait) {
function mcp_inc (line 53) | static void mcp_inc(uint8_t val) {
function mcp_dec (line 69) | static void mcp_dec(uint8_t val) {
function mcp_set (line 85) | void mcp_set(uint8_t val) {
FILE: firmware/common/rf_path.c
function enable_pa (line 6) | void enable_pa(void) {
function disable_pa (line 10) | void disable_pa(void) {
function enable_mixer (line 14) | void enable_mixer(void) {
function disable_mixer (line 18) | void disable_mixer(void) {
function disable_adc (line 22) | void disable_adc(void) {
function enable_adc (line 26) | void enable_adc(void) {
function enable_adf4158 (line 30) | void enable_adf4158(void) {
function disable_adf4158 (line 34) | void disable_adf4158(void) {
function rf_disable (line 38) | void rf_disable(void) {
function rf_enable (line 47) | void rf_enable(void) {
function adf4158_write_register (line 54) | void adf4158_write_register(uint32_t data) {
function adf4158_read_register (line 63) | uint32_t adf4158_read_register(void) {
FILE: firmware/common/rom_iap.c
function iap_is_implemented (line 54) | bool iap_is_implemented(void)
function isp_iap_ret_code_t (line 67) | isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res)
FILE: firmware/common/rom_iap.h
type iap_cmd_code_t (line 27) | typedef enum
type isp_iap_ret_code_t (line 69) | typedef enum
type iap_cmd_res_t (line 99) | typedef struct
FILE: firmware/common/sgpio.c
function sgpio_configure_pin_functions (line 33) | void sgpio_configure_pin_functions() {
function sgpio_test_interface (line 63) | void sgpio_test_interface() {
function sgpio_set_slice_mode (line 91) | void sgpio_set_slice_mode(
function sgpio_configure (line 106) | void sgpio_configure(void) {
function sgpio_configure_clock (line 355) | void sgpio_configure_clock(uint16_t preset, uint16_t reg) {
FILE: firmware/common/sgpio.h
type sgpio_direction_t (line 27) | typedef enum {
FILE: firmware/common/streaming.c
function baseband_streaming_enable (line 30) | void baseband_streaming_enable() {
function baseband_streaming_disable (line 38) | void baseband_streaming_disable() {
FILE: firmware/common/usb.c
function usb_queue_head_t (line 41) | usb_queue_head_t* usb_queue_head(
function usb_endpoint_t (line 47) | static usb_endpoint_t* usb_endpoint_from_address(
function uint_fast8_t (line 53) | static uint_fast8_t usb_endpoint_address(
function usb_endpoint_is_in (line 60) | static bool usb_endpoint_is_in(const uint_fast8_t endpoint_address) {
function uint_fast8_t (line 64) | static uint_fast8_t usb_endpoint_number(const uint_fast8_t endpoint_addr...
function usb_peripheral_reset (line 68) | void usb_peripheral_reset() {
function usb_phy_enable (line 75) | static void usb_phy_enable() {
function usb_clear_pending_interrupts (line 79) | static void usb_clear_pending_interrupts(const uint32_t mask) {
function usb_clear_all_pending_interrupts (line 87) | static void usb_clear_all_pending_interrupts() {
function usb_wait_for_endpoint_priming_to_finish (line 91) | static void usb_wait_for_endpoint_priming_to_finish(const uint32_t mask) {
function usb_flush_endpoints (line 97) | static void usb_flush_endpoints(const uint32_t mask) {
function usb_wait_for_endpoint_flushing_to_finish (line 103) | static void usb_wait_for_endpoint_flushing_to_finish(const uint32_t mask) {
function usb_flush_primed_endpoints (line 109) | static void usb_flush_primed_endpoints(const uint32_t mask) {
function usb_flush_all_primed_endpoints (line 115) | static void usb_flush_all_primed_endpoints() {
function usb_endpoint_set_type (line 119) | static void usb_endpoint_set_type(
function usb_endpoint_enable (line 136) | static void usb_endpoint_enable(
function usb_endpoint_clear_pending_interrupts (line 147) | static void usb_endpoint_clear_pending_interrupts(
function usb_endpoint_disable (line 158) | void usb_endpoint_disable(
function usb_endpoint_prime (line 172) | void usb_endpoint_prime(
function usb_endpoint_is_priming (line 193) | static bool usb_endpoint_is_priming(
function usb_endpoint_schedule_wait (line 206) | void usb_endpoint_schedule_wait(
function usb_endpoint_schedule_append (line 225) | void usb_endpoint_schedule_append(
function usb_endpoint_flush (line 249) | void usb_endpoint_flush(
function usb_endpoint_is_ready (line 272) | bool usb_endpoint_is_ready(
function usb_endpoint_is_complete (line 283) | bool usb_endpoint_is_complete(
function usb_endpoint_stall (line 294) | void usb_endpoint_stall(
function usb_controller_run (line 305) | static void usb_controller_run() {
function usb_controller_stop (line 309) | static void usb_controller_stop() {
function uint_fast8_t (line 313) | static uint_fast8_t usb_controller_is_resetting() {
function usb_controller_set_device_mode (line 317) | static void usb_controller_set_device_mode() {
function usb_speed_t (line 327) | usb_speed_t usb_speed(
function usb_clear_status (line 349) | static void usb_clear_status(const uint32_t status) {
function usb_get_status (line 353) | static uint32_t usb_get_status() {
function usb_clear_endpoint_setup_status (line 365) | static void usb_clear_endpoint_setup_status(const uint32_t endpoint_setu...
function usb_get_endpoint_setup_status (line 369) | static uint32_t usb_get_endpoint_setup_status() {
function usb_clear_endpoint_complete (line 373) | static void usb_clear_endpoint_complete(const uint32_t endpoint_complete) {
function usb_get_endpoint_complete (line 377) | static uint32_t usb_get_endpoint_complete() {
function usb_disable_all_endpoints (line 381) | static void usb_disable_all_endpoints() {
function usb_set_address_immediate (line 391) | void usb_set_address_immediate(
function usb_set_address_deferred (line 400) | void usb_set_address_deferred(
function usb_reset_all_endpoints (line 412) | static void usb_reset_all_endpoints() {
function usb_controller_reset (line 418) | static void usb_controller_reset() {
function usb_bus_reset (line 433) | static void usb_bus_reset(usb_device_t* const device) {
function usb_interrupt_enable (line 451) | static void usb_interrupt_enable(
function usb_device_init (line 459) | void usb_device_init(
function usb_run (line 489) | void usb_run(
function copy_setup (line 496) | static void copy_setup(usb_setup_t* const dst, const volatile uint8_t* c...
function usb_endpoint_init (line 507) | void usb_endpoint_init(
function usb_check_for_setup_events (line 553) | static void usb_check_for_setup_events() {
function usb_check_for_transfer_events (line 578) | static void usb_check_for_transfer_events() {
function usb0_isr (line 610) | void usb0_isr() {
FILE: firmware/common/usb_queue.c
function usb_queue_t (line 38) | static usb_queue_t* endpoint_queue(
function usb_queue_init (line 46) | void usb_queue_init(
function usb_transfer_t (line 63) | static usb_transfer_t* allocate_transfer(
function free_transfer (line 80) | static void free_transfer(usb_transfer_t* const transfer)
function usb_transfer_t (line 93) | static usb_transfer_t* endpoint_queue_transfer(
function usb_queue_flush_queue (line 109) | static void usb_queue_flush_queue(usb_queue_t* const queue)
function usb_queue_flush_endpoint (line 120) | void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint)
function usb_transfer_schedule (line 125) | int usb_transfer_schedule(
function usb_transfer_schedule_block (line 169) | int usb_transfer_schedule_block(
function usb_transfer_schedule_ack (line 184) | int usb_transfer_schedule_ack(
function usb_queue_transfer_complete (line 191) | void usb_queue_transfer_complete(usb_endpoint_t* const endpoint)
FILE: firmware/common/usb_queue.h
type usb_transfer_t (line 30) | typedef struct _usb_transfer_t usb_transfer_t;
type usb_queue_t (line 31) | typedef struct _usb_queue_t usb_queue_t;
type _usb_transfer_t (line 35) | struct _usb_transfer_t {
type _usb_queue_t (line 45) | struct _usb_queue_t {
FILE: firmware/common/usb_request.c
function usb_request (line 28) | static void usb_request(
function usb_setup_complete (line 63) | void usb_setup_complete(
function usb_control_out_complete (line 69) | void usb_control_out_complete(
function usb_control_in_complete (line 82) | void usb_control_in_complete(
FILE: firmware/common/usb_request.h
type usb_endpoint_type_t (line 27) | typedef enum {
type usb_transfer_stage_t (line 34) | typedef enum {
type usb_request_status_t (line 40) | typedef enum {
type usb_request_status_t (line 45) | typedef usb_request_status_t (*usb_request_handler_fn)(
type usb_request_handlers_t (line 50) | typedef struct {
FILE: firmware/common/usb_standard_request.c
function uint_fast16_t (line 50) | uint_fast16_t usb_endpoint_descriptor_max_packet_size(
function usb_transfer_type_t (line 56) | usb_transfer_type_t usb_endpoint_descriptor_transfer_type(
function usb_set_configuration_changed_cb (line 64) | void usb_set_configuration_changed_cb(
function usb_set_configuration (line 70) | bool usb_set_configuration(
function usb_request_status_t (line 110) | static usb_request_status_t usb_send_descriptor(
function usb_request_status_t (line 130) | static usb_request_status_t usb_send_descriptor_string(
function usb_request_status_t (line 143) | static usb_request_status_t usb_send_descriptor_config(
function usb_request_status_t (line 162) | static usb_request_status_t usb_standard_request_get_descriptor_setup(
function usb_request_status_t (line 198) | static usb_request_status_t usb_standard_request_get_descriptor(
function usb_request_status_t (line 217) | static usb_request_status_t usb_standard_request_set_address_setup(
function usb_request_status_t (line 225) | static usb_request_status_t usb_standard_request_set_address(
function usb_request_status_t (line 248) | static usb_request_status_t usb_standard_request_set_configuration_setup(
function usb_request_status_t (line 264) | static usb_request_status_t usb_standard_request_set_configuration(
function usb_request_status_t (line 283) | static usb_request_status_t usb_standard_request_get_configuration_setup(
function usb_request_status_t (line 299) | static usb_request_status_t usb_standard_request_get_configuration(
function usb_request_status_t (line 318) | usb_request_status_t usb_standard_request(
FILE: firmware/common/usb_type.h
type usb_setup_t (line 33) | typedef struct ATTR_PACKED {
type usb_standard_request_t (line 59) | typedef enum {
type usb_setup_request_type_t (line 73) | typedef enum {
type usb_transfer_direction_t (line 88) | typedef enum {
type usb_descriptor_type_t (line 93) | typedef enum {
type usb_transfer_type_t (line 104) | typedef enum {
type usb_speed_t (line 111) | typedef enum {
type usb_configuration_t (line 118) | typedef struct {
type usb_device_t (line 124) | typedef struct {
type usb_endpoint_t (line 132) | typedef struct usb_endpoint_t usb_endpoint_t;
type usb_endpoint_t (line 133) | struct usb_endpoint_t {
FILE: firmware/common/w25q80bv.c
function w25q80bv_setup (line 42) | void w25q80bv_setup(void)
function w25q80bv_get_status (line 95) | uint8_t w25q80bv_get_status(void)
function w25q80bv_get_device_id (line 108) | uint8_t w25q80bv_get_device_id(void)
function w25q80bv_get_unique_id (line 127) | void w25q80bv_get_unique_id(w25q80bv_unique_id_t* unique_id)
function w25q80bv_wait_while_busy (line 149) | void w25q80bv_wait_while_busy(void)
function w25q80bv_write_enable (line 154) | void w25q80bv_write_enable(void)
function w25q80bv_chip_erase (line 162) | void w25q80bv_chip_erase(void)
function w25q80bv_page_program (line 180) | void w25q80bv_page_program(const uint32_t addr, const uint16_t len, cons...
function w25q80bv_read_page (line 205) | void w25q80bv_read_page(const uint32_t addr, const uint16_t len, uint8_t...
function w25q80bv_program (line 223) | void w25q80bv_program(uint32_t addr, uint32_t len, const uint8_t* data)
FILE: firmware/common/w25q80bv.h
type w25q80bv_unique_id_t (line 43) | typedef union
FILE: firmware/hackrf_usb/hackrf_usb.c
function set_transceiver_mode (line 57) | void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
function transceiver_mode_t (line 78) | transceiver_mode_t transceiver_mode(void) {
function usb_request_status_t (line 82) | usb_request_status_t usb_vendor_request_set_transceiver_mode(
function usb_request_status_t (line 133) | usb_request_status_t usb_vendor_request(
function usb_configuration_changed (line 156) | void usb_configuration_changed(
function usb_set_descriptor_by_serial_number (line 177) | void usb_set_descriptor_by_serial_number(void)
function main (line 202) | int main(void) {
FILE: firmware/hackrf_usb/sgpio_isr.c
function sgpio_isr_rx (line 31) | void sgpio_isr_rx() {
FILE: firmware/hackrf_usb/usb_api_board_info.c
function usb_request_status_t (line 34) | usb_request_status_t usb_vendor_request_read_board_id(
function usb_request_status_t (line 45) | usb_request_status_t usb_vendor_request_read_version_string(
function usb_request_status_t (line 58) | usb_request_status_t usb_vendor_request_read_partid_serialno(
FILE: firmware/hackrf_usb/usb_api_board_info.h
type read_partid_serialno_t (line 31) | typedef struct {
FILE: firmware/hackrf_usb/usb_api_cpld.c
function cpld_buffer_refilled (line 41) | static void cpld_buffer_refilled(void* user_data, unsigned int length)
function refill_cpld_buffer (line 48) | static void refill_cpld_buffer(void)
function cpld_update (line 63) | void cpld_update(void)
FILE: firmware/hackrf_usb/usb_api_register.c
function usb_request_status_t (line 76) | usb_request_status_t usb_vendor_request_write_adf4158(
function usb_request_status_t (line 90) | usb_request_status_t usb_vendor_request_read_adf4158(
function usb_request_status_t (line 107) | usb_request_status_t usb_vendor_request_set_mcp(
function usb_request_status_t (line 124) | usb_request_status_t usb_vendor_request_set_gpio(
function usb_request_status_t (line 154) | usb_request_status_t usb_vendor_request_clear_gpio(
function usb_request_status_t (line 182) | usb_request_status_t usb_vendor_request_set_clock(
function usb_request_status_t (line 197) | usb_request_status_t usb_vendor_request_set_trigger(
FILE: firmware/hackrf_usb/usb_api_spiflash.c
function usb_request_status_t (line 33) | usb_request_status_t usb_vendor_request_erase_spiflash(
function usb_request_status_t (line 48) | usb_request_status_t usb_vendor_request_write_spiflash(
function usb_request_status_t (line 86) | usb_request_status_t usb_vendor_request_read_spiflash(
FILE: firmware/hackrf_usb/usb_api_transceiver.c
type set_freq_params_t (line 37) | typedef struct {
type set_freq_explicit_params (line 44) | struct set_freq_explicit_params {
type set_freq_explicit_params (line 50) | struct set_freq_explicit_params
type set_sample_r_params_t (line 52) | typedef struct {
function usb_request_status_t (line 59) | usb_request_status_t usb_vendor_request_set_baseband_filter_bandwidth(
function usb_request_status_t (line 75) | usb_request_status_t usb_vendor_request_set_freq(
function usb_request_status_t (line 99) | usb_request_status_t usb_vendor_request_set_sample_rate_frac(
function usb_request_status_t (line 122) | usb_request_status_t usb_vendor_request_set_amp_enable(
function usb_request_status_t (line 143) | usb_request_status_t usb_vendor_request_set_lna_gain(
function usb_request_status_t (line 158) | usb_request_status_t usb_vendor_request_set_vga_gain(
function usb_request_status_t (line 172) | usb_request_status_t usb_vendor_request_set_txvga_gain(
function usb_request_status_t (line 186) | usb_request_status_t usb_vendor_request_set_antenna_enable(
function usb_request_status_t (line 207) | usb_request_status_t usb_vendor_request_set_freq_explicit(
FILE: firmware/libopencm3/include/libopencm3/cm3/cortex.h
function cm_enable_interrupts (line 23) | static inline void cm_enable_interrupts(void)
function cm_disable_interrupts (line 28) | static inline void cm_disable_interrupts(void)
FILE: firmware/libopencm3/include/libopencm3/cm3/scb.h
function BEGIN_DECLS (line 415) | BEGIN_DECLS
FILE: firmware/libopencm3/include/libopencm3/cm3/sync.h
type mutex_t (line 44) | typedef uint32_t mutex_t;
FILE: firmware/libopencm3/include/libopencm3/cm3/vector.h
type vector_table_t (line 47) | typedef struct {
FILE: firmware/libopencm3/include/libopencm3/lm4f/gpio.h
type gpio_mode (line 183) | enum gpio_mode {
type gpio_pullup (line 189) | enum gpio_pullup {
type gpio_output_type (line 195) | enum gpio_output_type {
type gpio_drive_strength (line 200) | enum gpio_drive_strength {
type gpio_trigger (line 207) | enum gpio_trigger {
type gpio_mode (line 220) | enum gpio_mode
type gpio_pullup (line 221) | enum gpio_pullup
type gpio_output_type (line 222) | enum gpio_output_type
type gpio_drive_strength (line 223) | enum gpio_drive_strength
function gpio_read (line 249) | static inline uint8_t gpio_read(uint32_t gpioport, uint8_t gpios)
function gpio_write (line 269) | static inline void gpio_write(uint32_t gpioport, uint8_t gpios, uint8_t ...
function gpio_set (line 284) | static inline void gpio_set(uint32_t gpioport, uint8_t gpios)
function gpio_clear (line 298) | static inline void gpio_clear(uint32_t gpioport, uint8_t gpios)
function gpio_port_read (line 314) | static inline uint8_t gpio_port_read(uint32_t gpioport)
function gpio_port_write (line 333) | static inline void gpio_port_write(uint32_t gpioport, uint8_t data)
type gpio_trigger (line 339) | enum gpio_trigger
function gpio_is_interrupt_source (line 353) | static inline bool gpio_is_interrupt_source(uint32_t gpioport, uint8_t s...
function gpio_clear_interrupt_flag (line 369) | static inline void gpio_clear_interrupt_flag(uint32_t gpioport, uint8_t ...
FILE: firmware/libopencm3/include/libopencm3/lm4f/rcc.h
type osc_src (line 48) | enum osc_src {
type pwm_clkdiv (line 62) | enum pwm_clkdiv {
type xtal_t (line 79) | enum xtal_t {
type xtal_t (line 108) | enum xtal_t
type osc_src (line 116) | enum osc_src
type pwm_clkdiv (line 120) | enum pwm_clkdiv
type osc_src (line 127) | enum osc_src
type xtal_t (line 127) | enum xtal_t
FILE: firmware/libopencm3/include/libopencm3/lm4f/systemcontrol.h
type lm4f_clken (line 489) | enum lm4f_clken {
type lm4f_clken (line 735) | enum lm4f_clken
type lm4f_clken (line 736) | enum lm4f_clken
FILE: firmware/libopencm3/include/libopencm3/lm4f/uart.h
type uart_parity (line 364) | enum uart_parity {
type uart_flowctl (line 372) | enum uart_flowctl {
type uart_interrupt_flag (line 385) | enum uart_interrupt_flag {
type uart_fifo_rx_trigger_level (line 412) | enum uart_fifo_rx_trigger_level {
type uart_fifo_tx_trigger_level (line 432) | enum uart_fifo_tx_trigger_level {
type uart_parity (line 448) | enum uart_parity
type uart_flowctl (line 450) | enum uart_flowctl
type uart_fifo_rx_trigger_level (line 471) | enum uart_fifo_rx_trigger_level
type uart_fifo_tx_trigger_level (line 472) | enum uart_fifo_tx_trigger_level
function uart_is_tx_fifo_full (line 482) | static inline
function uart_is_tx_fifo_empty (line 494) | static inline
function uart_is_rx_fifo_full (line 505) | static inline
function uart_is_rx_fifo_empty (line 516) | static inline
type uart_interrupt_flag (line 523) | enum uart_interrupt_flag
type uart_interrupt_flag (line 524) | enum uart_interrupt_flag
type uart_interrupt_flag (line 529) | enum uart_interrupt_flag
function uart_is_interrupt_source (line 539) | static inline
FILE: firmware/libopencm3/include/libopencm3/lm4f/usb.h
type usb_interrupt (line 388) | enum usb_interrupt {
type usb_ep_interrupt (line 396) | enum usb_ep_interrupt {
type usb_interrupt (line 411) | enum usb_interrupt
type usb_ep_interrupt (line 412) | enum usb_ep_interrupt
type usb_ep_interrupt (line 413) | enum usb_ep_interrupt
type usb_interrupt (line 414) | enum usb_interrupt
type usb_ep_interrupt (line 415) | enum usb_ep_interrupt
type usb_ep_interrupt (line 416) | enum usb_ep_interrupt
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/gpdma.h
type gpdma_lli_t (line 42) | typedef struct gpdma_lli_t gpdma_lli_t;
type gpdma_lli_t (line 43) | struct gpdma_lli_t {
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/scu.h
type scu_grp_pin_t (line 443) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/sgpio.h
type sgpio_t (line 583) | typedef struct {
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/ssp.h
type ssp_num_t (line 114) | typedef enum {
type ssp_datasize_t (line 123) | typedef enum {
type ssp_frame_format_t (line 140) | typedef enum {
type ssp_cpol_cpha_t (line 147) | typedef enum {
type ssp_mode_t (line 158) | typedef enum {
type ssp_master_slave_t (line 167) | typedef enum {
type ssp_slave_option_t (line 178) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/uart.h
type uart_databit_t (line 370) | typedef enum {
type uart_stopbit_t (line 380) | typedef enum {
type uart_parity_t (line 390) | typedef enum {
type uart_num_t (line 403) | typedef enum {
type uart_error_t (line 410) | typedef enum {
type uart_rx_data_ready_t (line 415) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/lpc43xx/usb.h
type usb_transfer_descriptor_t (line 38) | typedef struct usb_transfer_descriptor_t usb_transfer_descriptor_t;
type usb_transfer_descriptor_t (line 39) | struct usb_transfer_descriptor_t {
type usb_queue_head_t (line 83) | typedef struct {
FILE: firmware/libopencm3/include/libopencm3/sam/eefc.h
function eefc_set_latency (line 72) | static inline void eefc_set_latency(uint8_t wait)
FILE: firmware/libopencm3/include/libopencm3/sam/gpio.h
type gpio_flags (line 27) | enum gpio_flags {
type gpio_flags (line 36) | enum gpio_flags
function gpio_set (line 38) | static inline void gpio_set(uint32_t gpioport, uint32_t gpios)
function gpio_clear (line 43) | static inline void gpio_clear(uint32_t gpioport, uint32_t gpios)
FILE: firmware/libopencm3/include/libopencm3/sam/pmc.h
type mck_src (line 130) | enum mck_src {
type mck_src (line 137) | enum mck_src
FILE: firmware/libopencm3/include/libopencm3/sam/pwm.h
function pwm_set_period (line 89) | static inline void pwm_set_period(int ch, uint32_t period)
function pwm_set_duty (line 94) | static inline void pwm_set_duty(int ch, uint32_t duty)
function pwm_enable (line 99) | static inline void pwm_enable(int ch)
function pwm_disable (line 104) | static inline void pwm_disable(int ch)
FILE: firmware/libopencm3/include/libopencm3/sam/usart.h
type usart_stopbits (line 172) | enum usart_stopbits {
type usart_parity (line 178) | enum usart_parity {
type usart_mode (line 187) | enum usart_mode {
type usart_flowcontrol (line 194) | enum usart_flowcontrol {
type usart_stopbits (line 201) | enum usart_stopbits
type usart_parity (line 202) | enum usart_parity
type usart_mode (line 203) | enum usart_mode
type usart_flowcontrol (line 204) | enum usart_flowcontrol
FILE: firmware/libopencm3/include/libopencm3/stm32/common/crypto_common_f24.h
type crypto_mode (line 245) | enum crypto_mode {
type crypto_keysize (line 261) | enum crypto_keysize {
type crypto_datatype (line 266) | enum crypto_datatype {
type crypto_keysize (line 276) | enum crypto_keysize
type crypto_datatype (line 278) | enum crypto_datatype
type crypto_mode (line 279) | enum crypto_mode
FILE: firmware/libopencm3/include/libopencm3/stm32/common/dac_common_all.h
type data_channel (line 384) | typedef enum {
type data_align (line 389) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/common/exti_common_all.h
type exti_trigger_type (line 61) | enum exti_trigger_type {
type exti_trigger_type (line 69) | enum exti_trigger_type
FILE: firmware/libopencm3/include/libopencm3/stm32/common/timer_common_all.h
type tim_oc_id (line 943) | enum tim_oc_id {
type tim_oc_mode (line 954) | enum tim_oc_mode {
type tim_ic_id (line 966) | enum tim_ic_id {
type tim_ic_filter (line 980) | enum tim_ic_filter {
type tim_ic_psc (line 1002) | enum tim_ic_psc {
type tim_ic_input (line 1013) | enum tim_ic_input {
type tim_et_pol (line 1023) | enum tim_et_pol {
type tim_oc_id (line 1068) | enum tim_oc_id
type tim_oc_id (line 1069) | enum tim_oc_id
type tim_oc_id (line 1070) | enum tim_oc_id
type tim_oc_id (line 1071) | enum tim_oc_id
type tim_oc_id (line 1072) | enum tim_oc_id
type tim_oc_mode (line 1073) | enum tim_oc_mode
type tim_oc_id (line 1074) | enum tim_oc_id
type tim_oc_id (line 1075) | enum tim_oc_id
type tim_oc_id (line 1077) | enum tim_oc_id
type tim_oc_id (line 1078) | enum tim_oc_id
type tim_oc_id (line 1079) | enum tim_oc_id
type tim_oc_id (line 1080) | enum tim_oc_id
type tim_oc_id (line 1082) | enum tim_oc_id
type tim_oc_id (line 1084) | enum tim_oc_id
type tim_oc_id (line 1085) | enum tim_oc_id
type tim_ic_id (line 1105) | enum tim_ic_id
type tim_ic_filter (line 1106) | enum tim_ic_filter
type tim_ic_id (line 1107) | enum tim_ic_id
type tim_ic_psc (line 1108) | enum tim_ic_psc
type tim_ic_id (line 1109) | enum tim_ic_id
type tim_ic_input (line 1110) | enum tim_ic_input
type tim_ic_id (line 1111) | enum tim_ic_id
type tim_ic_id (line 1112) | enum tim_ic_id
type tim_ic_filter (line 1114) | enum tim_ic_filter
type tim_ic_psc (line 1115) | enum tim_ic_psc
type tim_et_pol (line 1116) | enum tim_et_pol
FILE: firmware/libopencm3/include/libopencm3/stm32/common/timer_common_f24.h
type tim_ic_pol (line 92) | enum tim_ic_pol {
type tim_ic_id (line 103) | enum tim_ic_id
type tim_ic_pol (line 104) | enum tim_ic_pol
FILE: firmware/libopencm3/include/libopencm3/stm32/f0/adc.h
type adc_opmode (line 280) | enum adc_opmode {
type adc_opmode (line 299) | enum adc_opmode
FILE: firmware/libopencm3/include/libopencm3/stm32/f0/rcc.h
type rcc_osc (line 345) | enum rcc_osc {
type rcc_periph_clken (line 351) | enum rcc_periph_clken {
type rcc_periph_rst (line 393) | enum rcc_periph_rst {
type rcc_osc (line 438) | enum rcc_osc
type rcc_osc (line 439) | enum rcc_osc
type rcc_osc (line 440) | enum rcc_osc
type rcc_osc (line 441) | enum rcc_osc
type rcc_osc (line 442) | enum rcc_osc
type rcc_osc (line 443) | enum rcc_osc
type rcc_osc (line 444) | enum rcc_osc
type rcc_osc (line 445) | enum rcc_osc
type rcc_osc (line 446) | enum rcc_osc
type rcc_osc (line 451) | enum rcc_osc
type rcc_osc (line 457) | enum rcc_osc
type rcc_periph_clken (line 464) | enum rcc_periph_clken
type rcc_periph_clken (line 465) | enum rcc_periph_clken
type rcc_periph_rst (line 466) | enum rcc_periph_rst
type rcc_periph_rst (line 467) | enum rcc_periph_rst
type rcc_periph_rst (line 468) | enum rcc_periph_rst
FILE: firmware/libopencm3/include/libopencm3/stm32/f1/rcc.h
type osc_t (line 498) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/f1/rtc.h
type rtcflag_t (line 144) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/f1/timer.h
type tim_ic_pol (line 41) | enum tim_ic_pol {
type tim_ic_id (line 51) | enum tim_ic_id
type tim_ic_pol (line 52) | enum tim_ic_pol
FILE: firmware/libopencm3/include/libopencm3/stm32/f2/rcc.h
type clock_3v3_t (line 458) | typedef enum {
type clock_scale_t (line 463) | typedef struct {
type osc_t (line 478) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/f3/rcc.h
type rcc_clock (line 393) | enum rcc_clock {
type clock_scale_t (line 400) | typedef struct {
type osc (line 414) | enum osc {
type osc (line 420) | enum osc
type osc (line 421) | enum osc
type osc (line 422) | enum osc
type osc (line 423) | enum osc
type osc (line 426) | enum osc
type osc (line 427) | enum osc
type osc (line 428) | enum osc
type osc (line 429) | enum osc
type osc (line 430) | enum osc
type osc (line 433) | enum osc
type osc (line 434) | enum osc
FILE: firmware/libopencm3/include/libopencm3/stm32/f4/crypto.h
type crypto_mode_mac (line 81) | enum crypto_mode_mac {
type crypto_mode_mac (line 93) | enum crypto_mode_mac
FILE: firmware/libopencm3/include/libopencm3/stm32/f4/pwr.h
type vos_scale_t (line 76) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/f4/rcc.h
type clock_3v3_t (line 459) | typedef enum {
type clock_scale_t (line 466) | typedef struct {
type osc_t (line 484) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/l1/pwr.h
type vos_scale_t (line 100) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/l1/rcc.h
type clock_scale_t (line 387) | typedef struct {
type clock_config_entry_t (line 401) | typedef enum {
type osc_t (line 420) | typedef enum {
FILE: firmware/libopencm3/include/libopencm3/stm32/usb_desc.h
type usb_desc_head (line 30) | struct usb_desc_head {
type usb_device_desc (line 35) | struct usb_device_desc {
type usb_conf_desc_header (line 51) | struct usb_conf_desc_header {
type usb_int_desc_header (line 66) | struct usb_int_desc_header {
type usb_ep_desc (line 77) | struct usb_ep_desc {
type usb_conf_desc (line 90) | struct usb_conf_desc {
type usb_string_desc (line 96) | struct usb_string_desc {
FILE: firmware/libopencm3/include/libopencm3/usb/cdc.h
type usb_cdc_header_descriptor (line 76) | struct usb_cdc_header_descriptor {
type usb_cdc_union_descriptor (line 84) | struct usb_cdc_union_descriptor {
type usb_cdc_call_management_descriptor (line 100) | struct usb_cdc_call_management_descriptor {
type usb_cdc_acm_descriptor (line 109) | struct usb_cdc_acm_descriptor {
type usb_cdc_line_coding (line 124) | struct usb_cdc_line_coding {
type usb_cdc_notification (line 137) | struct usb_cdc_notification {
FILE: firmware/libopencm3/include/libopencm3/usb/dfu.h
type dfu_req (line 41) | enum dfu_req {
type dfu_status (line 51) | enum dfu_status {
type dfu_state (line 70) | enum dfu_state {
type usb_dfu_descriptor (line 85) | struct usb_dfu_descriptor {
FILE: firmware/libopencm3/include/libopencm3/usb/hid.h
type usb_hid_descriptor (line 48) | struct usb_hid_descriptor {
FILE: firmware/libopencm3/include/libopencm3/usb/usbd.h
type usbd_driver (line 52) | typedef struct _usbd_driver usbd_driver;
type usbd_device (line 53) | typedef struct _usbd_device usbd_device;
type usb_device_descriptor (line 63) | struct usb_device_descriptor
type usb_config_descriptor (line 64) | struct usb_config_descriptor
type usb_setup_data (line 79) | struct usb_setup_data
type usb_setup_data (line 81) | struct usb_setup_data
FILE: firmware/libopencm3/include/libopencm3/usb/usbstd.h
type usb_setup_data (line 56) | struct usb_setup_data {
type usb_device_descriptor (line 119) | struct usb_device_descriptor {
type usb_device_qualifier_descriptor (line 141) | struct usb_device_qualifier_descriptor {
type usb_config_descriptor (line 154) | struct usb_config_descriptor {
type usb_interface_descriptor (line 182) | struct usb_interface_descriptor {
type usb_endpoint_descriptor (line 201) | struct usb_endpoint_descriptor {
type usb_string_descriptor (line 229) | struct usb_string_descriptor {
type usb_iface_assoc_descriptor (line 236) | struct usb_iface_assoc_descriptor {
type usb_language_id (line 249) | enum usb_language_id {
FILE: firmware/libopencm3/include/libopencmsis/core_cm3.h
type SCB_TypeDef (line 39) | typedef struct {
type CoreDebug_TypeDef (line 64) | typedef struct {
function NVIC_ClearPendingIRQ (line 75) | static inline void NVIC_ClearPendingIRQ(uint8_t irqn)
function NVIC_EnableIRQ (line 79) | static inline void NVIC_EnableIRQ(uint8_t irqn)
function NVIC_DisableIRQ (line 83) | static inline void NVIC_DisableIRQ(uint8_t irqn)
type MPU_TypeDef (line 98) | typedef struct {
type SysTick_TypeDef (line 136) | typedef struct {
function SysTick_Config (line 144) | static inline uint32_t SysTick_Config(uint32_t n_ticks)
type ITM_TypeDef (line 161) | typedef struct {
FILE: firmware/libopencm3/lib/cm3/assert.c
function cm3_assert_failed (line 22) | void __attribute__((weak)) cm3_assert_failed(void)
function cm3_assert_failed_verbose (line 27) | void __attribute__((weak)) cm3_assert_failed_verbose(
FILE: firmware/libopencm3/lib/cm3/nvic.c
function nvic_enable_irq (line 57) | void nvic_enable_irq(uint8_t irqn)
function nvic_disable_irq (line 70) | void nvic_disable_irq(uint8_t irqn)
function nvic_get_pending_irq (line 84) | uint8_t nvic_get_pending_irq(uint8_t irqn)
function nvic_set_pending_irq (line 98) | void nvic_set_pending_irq(uint8_t irqn)
function nvic_clear_pending_irq (line 112) | void nvic_clear_pending_irq(uint8_t irqn)
function nvic_get_irq_enabled (line 126) | uint8_t nvic_get_irq_enabled(uint8_t irqn)
function nvic_set_priority (line 152) | void nvic_set_priority(uint8_t irqn, uint8_t priority)
function nvic_get_active_irq (line 177) | uint8_t nvic_get_active_irq(uint8_t irqn)
function nvic_generate_software_interrupt (line 192) | void nvic_generate_software_interrupt(uint16_t irqn)
FILE: firmware/libopencm3/lib/cm3/scb.c
function scb_reset_core (line 26) | void scb_reset_core(void)
function scb_reset_system (line 34) | void scb_reset_system(void)
function scb_set_priority_grouping (line 43) | void scb_set_priority_grouping(uint32_t prigroup)
FILE: firmware/libopencm3/lib/cm3/sync.c
function __dmb (line 23) | void __dmb()
function __ldrex (line 33) | uint32_t __ldrex(volatile uint32_t *addr)
function __strex (line 40) | uint32_t __strex(uint32_t val, volatile uint32_t *addr)
function mutex_lock (line 48) | void mutex_lock(mutex_t *m)
function mutex_unlock (line 66) | void mutex_unlock(mutex_t *m)
FILE: firmware/libopencm3/lib/cm3/systick.c
function systick_set_reload (line 52) | void systick_set_reload(uint32_t value)
function systick_get_reload (line 63) | uint32_t systick_get_reload(void)
function systick_get_value (line 74) | uint32_t systick_get_value(void)
function systick_set_clocksource (line 87) | void systick_set_clocksource(uint8_t clocksource)
function systick_interrupt_enable (line 97) | void systick_interrupt_enable(void)
function systick_interrupt_disable (line 107) | void systick_interrupt_disable(void)
function systick_counter_enable (line 117) | void systick_counter_enable(void)
function systick_counter_disable (line 127) | void systick_counter_disable(void)
function systick_get_countflag (line 141) | uint8_t systick_get_countflag(void)
function systick_get_calib (line 151) | uint32_t systick_get_calib(void)
FILE: firmware/libopencm3/lib/cm3/vector.c
function reset_handler (line 62) | __attribute__ ((naked)) reset_handler(void)
function blocking_handler (line 98) | void blocking_handler(void)
function null_handler (line 103) | void null_handler(void)
FILE: firmware/libopencm3/lib/dispatch/vector_chipset.c
function pre_main (line 9) | static void pre_main(void) {}
FILE: firmware/libopencm3/lib/lm3s/gpio.c
function gpio_set (line 40) | void gpio_set(uint32_t gpioport, uint8_t gpios)
function gpio_clear (line 46) | void gpio_clear(uint32_t gpioport, uint8_t gpios)
FILE: firmware/libopencm3/lib/lm4f/gpio.c
function gpio_enable_ahb_aperture (line 186) | void gpio_enable_ahb_aperture(void)
function gpio_mode_setup (line 209) | void gpio_mode_setup(uint32_t gpioport, enum gpio_mode mode,
function gpio_set_output_config (line 270) | void gpio_set_output_config(uint32_t gpioport, enum gpio_output_type otype,
function gpio_set_af (line 321) | void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint8_t gpios)
function gpio_unlock_commit (line 365) | void gpio_unlock_commit(uint32_t gpioport, uint8_t gpios)
function gpio_toggle (line 441) | void gpio_toggle(uint32_t gpioport, uint8_t gpios)
function gpio_configure_trigger (line 527) | void gpio_configure_trigger(uint32_t gpioport, enum gpio_trigger trigger,
function gpio_enable_interrupts (line 572) | void gpio_enable_interrupts(uint32_t gpioport, uint8_t gpios)
function gpio_disable_interrupts (line 590) | void gpio_disable_interrupts(uint32_t gpioport, uint8_t gpios)
FILE: firmware/libopencm3/lib/lm4f/rcc.c
function rcc_configure_xtal (line 119) | void rcc_configure_xtal(enum xtal_t xtal)
function rcc_disable_main_osc (line 134) | void rcc_disable_main_osc(void)
function rcc_disable_interal_osc (line 144) | void rcc_disable_interal_osc(void)
function rcc_enable_main_osc (line 154) | void rcc_enable_main_osc(void)
function rcc_enable_interal_osc (line 164) | void rcc_enable_interal_osc(void)
function rcc_enable_rcc2 (line 177) | void rcc_enable_rcc2(void)
function rcc_pll_off (line 190) | void rcc_pll_off(void)
function rcc_pll_on (line 203) | void rcc_pll_on(void)
function rcc_set_osc_source (line 216) | void rcc_set_osc_source(enum osc_src src)
function rcc_pll_bypass_disable (line 235) | void rcc_pll_bypass_disable(void)
function rcc_pll_bypass_enable (line 249) | void rcc_pll_bypass_enable(void)
function rcc_set_pll_divisor (line 273) | void rcc_set_pll_divisor(uint8_t div400)
function rcc_set_pwm_divisor (line 294) | void rcc_set_pwm_divisor(enum pwm_clkdiv div)
function rcc_usb_pll_off (line 312) | void rcc_usb_pll_off(void)
function rcc_usb_pll_on (line 325) | void rcc_usb_pll_on(void)
function rcc_wait_for_pll_ready (line 336) | void rcc_wait_for_pll_ready(void)
function rcc_change_pll_divisor (line 364) | void rcc_change_pll_divisor(uint8_t pll_div400)
function rcc_get_system_clock_frequency (line 383) | uint32_t rcc_get_system_clock_frequency(void)
function xtal_to_freq (line 389) | static uint32_t xtal_to_freq(enum xtal_t xtal)
function rcc_sysclk_config (line 443) | void rcc_sysclk_config(enum osc_src src, enum xtal_t xtal, uint8_t pll_d...
FILE: firmware/libopencm3/lib/lm4f/systemcontrol.c
function periph_clock_enable (line 27) | void periph_clock_enable(enum lm4f_clken periph)
function periph_clock_disable (line 37) | void periph_clock_disable(enum lm4f_clken periph)
FILE: firmware/libopencm3/lib/lm4f/uart.c
function uart_enable (line 93) | void uart_enable(uint32_t uart)
function uart_disable (line 103) | void uart_disable(uint32_t uart)
function uart_set_baudrate (line 114) | void uart_set_baudrate(uint32_t uart, uint32_t baud)
function uart_set_databits (line 139) | void uart_set_databits(uint32_t uart, uint8_t databits)
function uart_set_stopbits (line 160) | void uart_set_stopbits(uint32_t uart, uint8_t stopbits)
function uart_set_parity (line 175) | void uart_set_parity(uint32_t uart, enum uart_parity parity)
function uart_set_flow_control (line 216) | void uart_set_flow_control(uint32_t uart, enum uart_flowctl flow)
function uart_clock_from_piosc (line 238) | void uart_clock_from_piosc(uint32_t uart)
function uart_clock_from_sysclk (line 248) | void uart_clock_from_sysclk(uint32_t uart)
function uart_send (line 275) | void uart_send(uint32_t uart, uint16_t data)
function uart_recv (line 287) | uint16_t uart_recv(uint32_t uart)
function uart_wait_send_ready (line 303) | void uart_wait_send_ready(uint32_t uart)
function uart_wait_recv_ready (line 316) | void uart_wait_recv_ready(uint32_t uart)
function uart_send_blocking (line 330) | void uart_send_blocking(uint32_t uart, uint16_t data)
function uart_recv_blocking (line 344) | uint16_t uart_recv_blocking(uint32_t uart)
function uart_enable_interrupts (line 430) | void uart_enable_interrupts(uint32_t uart, enum uart_interrupt_flag ints)
function uart_disable_interrupts (line 446) | void uart_disable_interrupts(uint32_t uart, enum uart_interrupt_flag ints)
function uart_enable_rx_interrupt (line 459) | void uart_enable_rx_interrupt(uint32_t uart)
function uart_disable_rx_interrupt (line 469) | void uart_disable_rx_interrupt(uint32_t uart)
function uart_enable_tx_interrupt (line 482) | void uart_enable_tx_interrupt(uint32_t uart)
function uart_disable_tx_interrupt (line 492) | void uart_disable_tx_interrupt(uint32_t uart)
function uart_clear_interrupt_flag (line 508) | void uart_clear_interrupt_flag(uint32_t uart, enum uart_interrupt_flag i...
function uart_enable_rx_dma (line 527) | void uart_enable_rx_dma(uint32_t uart)
function uart_disable_rx_dma (line 537) | void uart_disable_rx_dma(uint32_t uart)
function uart_enable_tx_dma (line 547) | void uart_enable_tx_dma(uint32_t uart)
function uart_disable_tx_dma (line 557) | void uart_disable_tx_dma(uint32_t uart)
function uart_enable_fifo (line 594) | void uart_enable_fifo(uint32_t uart)
function uart_disable_fifo (line 604) | void uart_disable_fifo(uint32_t uart)
function uart_set_fifo_trigger_levels (line 616) | void uart_set_fifo_trigger_levels(uint32_t uart,
FILE: firmware/libopencm3/lib/lm4f/usb_lm4f.c
type _usbd_driver (line 113) | struct _usbd_driver
function usb_enable_interrupts (line 132) | void usb_enable_interrupts(enum usb_interrupt ints,
function usb_disable_interrupts (line 158) | void usb_disable_interrupts(enum usb_interrupt ints,
function lm4f_usb_soft_disconnect (line 170) | static inline void lm4f_usb_soft_disconnect(void)
function lm4f_usb_soft_connect (line 175) | static inline void lm4f_usb_soft_connect(void)
function lm4f_set_address (line 180) | static void lm4f_set_address(usbd_device *usbd_dev, uint8_t addr)
function lm4f_ep_setup (line 187) | static void lm4f_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t t...
function lm4f_endpoints_reset (line 292) | static void lm4f_endpoints_reset(usbd_device *usbd_dev)
function lm4f_ep_stall_set (line 301) | static void lm4f_ep_stall_set(usbd_device *usbd_dev, uint8_t addr,
function lm4f_ep_stall_get (line 333) | static uint8_t lm4f_ep_stall_get(usbd_device *usbd_dev, uint8_t addr)
function lm4f_ep_nak_set (line 351) | static void lm4f_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t...
function lm4f_ep_write_packet (line 360) | static uint16_t lm4f_ep_write_packet(usbd_device *usbd_dev, uint8_t addr,
function lm4f_ep_read_packet (line 411) | static uint16_t lm4f_ep_read_packet(usbd_device *usbd_dev, uint8_t addr,
function lm4f_poll (line 458) | static void lm4f_poll(usbd_device *usbd_dev)
function lm4f_disconnect (line 560) | static void lm4f_disconnect(usbd_device *usbd_dev, bool disconnected)
type _usbd_device (line 580) | struct _usbd_device
function usbd_device (line 583) | static usbd_device *lm4f_usbd_init(void)
type _usbd_driver (line 629) | struct _usbd_driver
FILE: firmware/libopencm3/lib/lpc13xx/gpio.c
function gpio_set (line 36) | void gpio_set(uint32_t gpioport, uint16_t gpios)
FILE: firmware/libopencm3/lib/lpc17xx/gpio.c
function gpio_set (line 37) | void gpio_set(uint32_t gpioport, uint32_t gpios)
function gpio_clear (line 42) | void gpio_clear(uint32_t gpioport, uint32_t gpios)
FILE: firmware/libopencm3/lib/lpc43xx/gpio.c
function gpio_set (line 37) | void gpio_set(uint32_t gpioport, uint32_t gpios)
function gpio_clear (line 42) | void gpio_clear(uint32_t gpioport, uint32_t gpios)
function gpio_toggle (line 47) | void gpio_toggle(uint32_t gpioport, uint32_t gpios)
function gpio_get (line 52) | uint32_t gpio_get(uint32_t gpioport, uint32_t gpios)
FILE: firmware/libopencm3/lib/lpc43xx/i2c.c
function i2c0_init (line 44) | void i2c0_init(const uint16_t duty_cycle_count)
function i2c0_tx_start (line 61) | void i2c0_tx_start(void)
function i2c0_tx_byte (line 70) | void i2c0_tx_byte(uint8_t byte)
function i2c0_rx_byte (line 81) | uint8_t i2c0_rx_byte(void)
function i2c0_stop (line 92) | void i2c0_stop(void)
FILE: firmware/libopencm3/lib/lpc43xx/ipc.c
function ipc_halt_m0 (line 25) | void ipc_halt_m0(void)
function ipc_start_m0 (line 39) | void ipc_start_m0(uint32_t cm0_baseaddr)
function ipc_m0apptxevent_clear (line 59) | void ipc_m0apptxevent_clear(void) {
FILE: firmware/libopencm3/lib/lpc43xx/m4/vector_chipset.c
function pre_main (line 28) | static void pre_main(void)
FILE: firmware/libopencm3/lib/lpc43xx/scu.c
function scu_pinmux (line 40) | void scu_pinmux(scu_grp_pin_t group_pin, uint32_t scu_conf)
FILE: firmware/libopencm3/lib/lpc43xx/ssp.c
function ssp_disable (line 39) | void ssp_disable(ssp_num_t ssp_num)
function ssp_init (line 55) | void ssp_init(ssp_num_t ssp_num,
function ssp_wait_until_not_busy (line 92) | static void ssp_wait_until_not_busy(ssp_num_t ssp_num)
function ssp_transfer (line 106) | uint16_t ssp_transfer(ssp_num_t ssp_num, uint16_t data)
FILE: firmware/libopencm3/lib/lpc43xx/timer.c
function timer_reset (line 25) | void timer_reset(uint32_t timer_peripheral)
function timer_enable_counter (line 31) | void timer_enable_counter(uint32_t timer_peripheral)
function timer_disable_counter (line 36) | void timer_disable_counter(uint32_t timer_peripheral)
function timer_set_counter (line 41) | void timer_set_counter(uint32_t timer_peripheral, uint32_t count)
function timer_get_counter (line 46) | uint32_t timer_get_counter(uint32_t timer_peripheral)
function timer_get_prescaler (line 51) | uint32_t timer_get_prescaler(uint32_t timer_peripheral)
function timer_set_prescaler (line 56) | void timer_set_prescaler(uint32_t timer_peripheral, uint32_t prescaler)
function timer_set_mode (line 61) | void timer_set_mode(uint32_t timer_peripheral, uint32_t mode)
function timer_set_count_input (line 67) | void timer_set_count_input(uint32_t timer_peripheral, uint32_t input)
FILE: firmware/libopencm3/lib/lpc43xx/uart.c
function uart_init (line 47) | void uart_init(uart_num_t uart_num, uart_databit_t data_nb_bits,
function uart_rx_data_ready_t (line 153) | uart_rx_data_ready_t uart_rx_data_ready(uart_num_t uart_num)
function uart_read (line 182) | uint8_t uart_read(uart_num_t uart_num)
function uart_read_timeout (line 200) | uint8_t uart_read_timeout(uart_num_t uart_num, uint32_t rx_timeout_nb_cy...
function uart_write (line 232) | void uart_write(uart_num_t uart_num, uint8_t data)
FILE: firmware/libopencm3/lib/lpc43xx_m0/vector.c
function reset_handler (line 128) | void WEAK reset_handler(void)
function blocking_handler (line 143) | void blocking_handler(void)
function null_handler (line 148) | void null_handler(void)
FILE: firmware/libopencm3/lib/sam/common/gpio.c
function gpio_init (line 22) | void gpio_init(uint32_t port, uint32_t pins, enum gpio_flags flags)
function gpio_toggle (line 58) | void gpio_toggle(uint32_t gpioport, uint32_t gpios)
FILE: firmware/libopencm3/lib/sam/common/pmc.c
function pmc_xtal_enable (line 26) | void pmc_xtal_enable(bool en, uint8_t startup_time)
function pmc_plla_config (line 38) | void pmc_plla_config(uint8_t mul, uint8_t div)
function pmc_peripheral_clock_enable (line 45) | void pmc_peripheral_clock_enable(uint8_t pid)
function pmc_peripheral_clock_disable (line 54) | void pmc_peripheral_clock_disable(uint8_t pid)
function pmc_mck_set_source (line 63) | void pmc_mck_set_source(enum mck_src src)
function pmc_clock_setup_in_xtal_12mhz_out_84mhz (line 69) | void pmc_clock_setup_in_xtal_12mhz_out_84mhz(void)
function pmc_clock_setup_in_rc_4mhz_out_84mhz (line 84) | void pmc_clock_setup_in_rc_4mhz_out_84mhz(void)
FILE: firmware/libopencm3/lib/sam/common/usart.c
function usart_set_baudrate (line 23) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 28) | void usart_set_databits(uint32_t usart, int bits)
function usart_set_stopbits (line 34) | void usart_set_stopbits(uint32_t usart, enum usart_stopbits sb)
function usart_set_parity (line 40) | void usart_set_parity(uint32_t usart, enum usart_parity par)
function usart_set_mode (line 45) | void usart_set_mode(uint32_t usart, enum usart_mode mode)
function usart_set_flow_control (line 53) | void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol fc)
function usart_enable (line 59) | void usart_enable(uint32_t usart)
function usart_disable (line 63) | void usart_disable(uint32_t usart)
function usart_send (line 67) | void usart_send(uint32_t usart, uint16_t data)
function usart_recv (line 72) | uint16_t usart_recv(uint32_t usart)
function usart_wait_send_ready (line 77) | void usart_wait_send_ready(uint32_t usart)
function usart_wait_recv_ready (line 82) | void usart_wait_recv_ready(uint32_t usart)
function usart_send_blocking (line 87) | void usart_send_blocking(uint32_t usart, uint16_t data)
function usart_recv_blocking (line 93) | uint16_t usart_recv_blocking(uint32_t usart)
function usart_enable_rx_interrupt (line 100) | void usart_enable_rx_interrupt(uint32_t usart)
function usart_disable_rx_interrupt (line 105) | void usart_disable_rx_interrupt(uint32_t usart)
FILE: firmware/libopencm3/lib/stm32/can.c
function can_reset (line 72) | void can_reset(uint32_t canport)
function can_init (line 101) | int can_init(uint32_t canport, bool ttcm, bool abom, bool awum, bool nart,
function can_filter_init (line 209) | void can_filter_init(uint32_t canport, uint32_t nr, bool scale_32bit,
function can_filter_id_mask_16bit_init (line 270) | void can_filter_id_mask_16bit_init(uint32_t canport, uint32_t nr, uint16...
function can_filter_id_mask_32bit_init (line 289) | void can_filter_id_mask_32bit_init(uint32_t canport, uint32_t nr, uint32...
function can_filter_id_list_16bit_init (line 307) | void can_filter_id_list_16bit_init(uint32_t canport, uint32_t nr,
function can_filter_id_list_32bit_init (line 327) | void can_filter_id_list_32bit_init(uint32_t canport, uint32_t nr,
function can_enable_irq (line 340) | void can_enable_irq(uint32_t canport, uint32_t irq)
function can_disable_irq (line 351) | void can_disable_irq(uint32_t canport, uint32_t irq)
function can_transmit (line 368) | int can_transmit(uint32_t canport, uint32_t id, bool ext, bool rtr,
function can_fifo_release (line 460) | void can_fifo_release(uint32_t canport, uint8_t fifo)
function can_receive (line 482) | void can_receive(uint32_t canport, uint8_t fifo, bool release, uint32_t ...
function can_available_mailbox (line 554) | bool can_available_mailbox(uint32_t canport)
FILE: firmware/libopencm3/lib/stm32/common/crc_common_all.c
function crc_reset (line 37) | void crc_reset(void)
function crc_calculate (line 52) | uint32_t crc_calculate(uint32_t data)
function crc_calculate_block (line 70) | uint32_t crc_calculate_block(uint32_t *datap, int size)
FILE: firmware/libopencm3/lib/stm32/common/crypto_common_f24.c
function crypto_wait_busy (line 42) | void crypto_wait_busy(void)
function crypto_set_key (line 52) | void crypto_set_key(enum crypto_keysize keysize, uint64_t key[])
function crypto_set_iv (line 73) | void crypto_set_iv(uint64_t iv[])
function crypto_set_datatype (line 89) | void crypto_set_datatype(enum crypto_datatype datatype)
function crypto_set_algorithm (line 100) | void crypto_set_algorithm(enum crypto_mode mode)
function crypto_start (line 124) | void crypto_start(void)
function crypto_stop (line 133) | void crypto_stop(void)
function crypto_process_block (line 152) | uint32_t crypto_process_block(uint32_t *inp, uint32_t *outp, uint32_t le...
FILE: firmware/libopencm3/lib/stm32/common/dac_common_all.c
function dac_enable (line 133) | void dac_enable(data_channel dac_channel)
function dac_disable (line 156) | void dac_disable(data_channel dac_channel)
function dac_buffer_enable (line 182) | void dac_buffer_enable(data_channel dac_channel)
function dac_buffer_disable (line 206) | void dac_buffer_disable(data_channel dac_channel)
function dac_dma_enable (line 230) | void dac_dma_enable(data_channel dac_channel)
function dac_dma_disable (line 253) | void dac_dma_disable(data_channel dac_channel)
function dac_trigger_enable (line 279) | void dac_trigger_enable(data_channel dac_channel)
function dac_trigger_disable (line 302) | void dac_trigger_disable(data_channel dac_channel)
function dac_set_trigger_source (line 328) | void dac_set_trigger_source(uint32_t dac_trig_src)
function dac_set_waveform_generation (line 347) | void dac_set_waveform_generation(uint32_t dac_wave_ens)
function dac_disable_waveform_generation (line 360) | void dac_disable_waveform_generation(data_channel dac_channel)
function dac_set_waveform_characteristics (line 395) | void dac_set_waveform_characteristics(uint32_t dac_mamp)
function dac_load_data_buffer_single (line 414) | void dac_load_data_buffer_single(uint16_t dac_data, data_align dac_data_...
function dac_load_data_buffer_dual (line 458) | void dac_load_data_buffer_dual(uint16_t dac_data1, uint16_t dac_data2,
function dac_software_trigger (line 485) | void dac_software_trigger(data_channel dac_channel)
FILE: firmware/libopencm3/lib/stm32/common/dma_common_f24.c
function dma_stream_reset (line 60) | void dma_stream_reset(uint32_t dma, uint8_t stream)
function dma_clear_interrupt_flags (line 95) | void dma_clear_interrupt_flags(uint32_t dma, uint8_t stream,
function dma_get_interrupt_flag (line 121) | bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t inter...
function dma_set_transfer_mode (line 149) | void dma_set_transfer_mode(uint32_t dma, uint8_t stream, uint32_t direct...
function dma_set_priority (line 177) | void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio)
function dma_set_memory_size (line 196) | void dma_set_memory_size(uint32_t dma, uint8_t stream, uint32_t mem_size)
function dma_set_peripheral_size (line 217) | void dma_set_peripheral_size(uint32_t dma, uint8_t stream,
function dma_enable_memory_increment_mode (line 237) | void dma_enable_memory_increment_mode(uint32_t dma, uint8_t stream)
function dma_disable_memory_increment_mode (line 251) | void dma_disable_memory_increment_mode(uint32_t dma, uint8_t stream)
function dma_enable_peripheral_increment_mode (line 269) | void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t stream)
function dma_disable_peripheral_increment_mode (line 284) | void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t stream)
function dma_enable_fixed_peripheral_increment_mode (line 302) | void dma_enable_fixed_peripheral_increment_mode(uint32_t dma, uint8_t st...
function dma_enable_circular_mode (line 324) | void dma_enable_circular_mode(uint32_t dma, uint8_t stream)
function dma_channel_select (line 343) | void dma_channel_select(uint32_t dma, uint8_t stream, uint32_t channel)
function dma_set_memory_burst (line 361) | void dma_set_memory_burst(uint32_t dma, uint8_t stream, uint32_t burst)
function dma_set_peripheral_burst (line 380) | void dma_set_peripheral_burst(uint32_t dma, uint8_t stream, uint32_t burst)
function dma_set_initial_target (line 399) | void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory)
function dma_get_target (line 422) | uint8_t dma_get_target(uint32_t dma, uint8_t stream)
function dma_enable_double_buffer_mode (line 446) | void dma_enable_double_buffer_mode(uint32_t dma, uint8_t stream)
function dma_disable_double_buffer_mode (line 458) | void dma_disable_double_buffer_mode(uint32_t dma, uint8_t stream)
function dma_set_peripheral_flow_control (line 475) | void dma_set_peripheral_flow_control(uint32_t dma, uint8_t stream)
function dma_set_dma_flow_control (line 491) | void dma_set_dma_flow_control(uint32_t dma, uint8_t stream)
function dma_enable_transfer_error_interrupt (line 503) | void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t stream)
function dma_disable_transfer_error_interrupt (line 516) | void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t stream)
function dma_enable_half_transfer_interrupt (line 528) | void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t stream)
function dma_disable_half_transfer_interrupt (line 541) | void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t stream)
function dma_enable_transfer_complete_interrupt (line 553) | void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t stream)
function dma_disable_transfer_complete_interrupt (line 566) | void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t stream)
function dma_enable_direct_mode_error_interrupt (line 578) | void dma_enable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream)
function dma_disable_direct_mode_error_interrupt (line 591) | void dma_disable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream)
function dma_enable_fifo_error_interrupt (line 603) | void dma_enable_fifo_error_interrupt(uint32_t dma, uint8_t stream)
function dma_disable_fifo_error_interrupt (line 616) | void dma_disable_fifo_error_interrupt(uint32_t dma, uint8_t stream)
function dma_fifo_status (line 632) | uint32_t dma_fifo_status(uint32_t dma, uint8_t stream)
function dma_enable_direct_mode (line 648) | void dma_enable_direct_mode(uint32_t dma, uint8_t stream)
function dma_enable_fifo_mode (line 662) | void dma_enable_fifo_mode(uint32_t dma, uint8_t stream)
function dma_set_fifo_threshold (line 678) | void dma_set_fifo_threshold(uint32_t dma, uint8_t stream, uint32_t thres...
function dma_enable_stream (line 691) | void dma_enable_stream(uint32_t dma, uint8_t stream)
function dma_disable_stream (line 705) | void dma_disable_stream(uint32_t dma, uint8_t stream)
function dma_set_peripheral_address (line 724) | void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t a...
function dma_set_memory_address (line 746) | void dma_set_memory_address(uint32_t dma, uint8_t stream, uint32_t address)
function dma_set_memory_address_1 (line 768) | void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t add...
function dma_set_number_of_data (line 789) | void dma_set_number_of_data(uint32_t dma, uint8_t stream, uint16_t number)
FILE: firmware/libopencm3/lib/stm32/common/dma_common_l1f013.c
function dma_channel_reset (line 52) | void dma_channel_reset(uint32_t dma, uint8_t channel)
function dma_clear_interrupt_flags (line 78) | void dma_clear_interrupt_flags(uint32_t dma, uint8_t channel,
function dma_get_interrupt_flag (line 97) | bool dma_get_interrupt_flag(uint32_t dma, uint8_t channel, uint32_t inte...
function dma_enable_mem2mem_mode (line 115) | void dma_enable_mem2mem_mode(uint32_t dma, uint8_t channel)
function dma_set_priority (line 132) | void dma_set_priority(uint32_t dma, uint8_t channel, uint32_t prio)
function dma_set_memory_size (line 149) | void dma_set_memory_size(uint32_t dma, uint8_t channel, uint32_t mem_size)
function dma_set_peripheral_size (line 169) | void dma_set_peripheral_size(uint32_t dma, uint8_t channel,
function dma_enable_memory_increment_mode (line 187) | void dma_enable_memory_increment_mode(uint32_t dma, uint8_t channel)
function dma_disable_memory_increment_mode (line 199) | void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel)
function dma_enable_peripheral_increment_mode (line 215) | void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t channel)
function dma_disable_peripheral_increment_mode (line 227) | void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel)
function dma_enable_circular_mode (line 246) | void dma_enable_circular_mode(uint32_t dma, uint8_t channel)
function dma_set_read_from_peripheral (line 261) | void dma_set_read_from_peripheral(uint32_t dma, uint8_t channel)
function dma_set_read_from_memory (line 275) | void dma_set_read_from_memory(uint32_t dma, uint8_t channel)
function dma_enable_transfer_error_interrupt (line 287) | void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t channel)
function dma_disable_transfer_error_interrupt (line 299) | void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t channel)
function dma_enable_half_transfer_interrupt (line 311) | void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t channel)
function dma_disable_half_transfer_interrupt (line 323) | void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t channel)
function dma_enable_transfer_complete_interrupt (line 335) | void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t channel)
function dma_disable_transfer_complete_interrupt (line 347) | void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t channel)
function dma_enable_channel (line 359) | void dma_enable_channel(uint32_t dma, uint8_t channel)
function dma_disable_channel (line 374) | void dma_disable_channel(uint32_t dma, uint8_t channel)
function dma_set_peripheral_address (line 393) | void dma_set_peripheral_address(uint32_t dma, uint8_t channel, uint32_t ...
function dma_set_memory_address (line 411) | void dma_set_memory_address(uint32_t dma, uint8_t channel, uint32_t addr...
function dma_set_number_of_data (line 430) | void dma_set_number_of_data(uint32_t dma, uint8_t channel, uint16_t number)
FILE: firmware/libopencm3/lib/stm32/common/exti_common_all.c
function exti_set_trigger (line 31) | void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig)
function exti_enable_request (line 49) | void exti_enable_request(uint32_t extis)
function exti_disable_request (line 58) | void exti_disable_request(uint32_t extis)
function exti_reset_request (line 71) | void exti_reset_request(uint32_t extis)
function exti_get_flag_status (line 79) | uint32_t exti_get_flag_status(uint32_t exti)
function exti_select_source (line 90) | void exti_select_source(uint32_t exti, uint32_t gpioport)
FILE: firmware/libopencm3/lib/stm32/common/flash_common_f234.c
function flash_set_ws (line 23) | void flash_set_ws(uint32_t ws)
function flash_unlock (line 33) | void flash_unlock(void)
function flash_lock (line 43) | void flash_lock(void)
function flash_clear_pgperr_flag (line 48) | void flash_clear_pgperr_flag(void)
function flash_clear_eop_flag (line 53) | void flash_clear_eop_flag(void)
function flash_clear_bsy_flag (line 58) | void flash_clear_bsy_flag(void)
function flash_wait_for_last_operation (line 64) | void flash_wait_for_last_operation(void)
FILE: firmware/libopencm3/lib/stm32/common/flash_common_f24.c
function flash_set_program_size (line 23) | static inline void flash_set_program_size(uint32_t psize)
function flash_dcache_enable (line 29) | void flash_dcache_enable(void)
function flash_dcache_disable (line 34) | void flash_dcache_disable(void)
function flash_icache_enable (line 39) | void flash_icache_enable(void)
function flash_icache_disable (line 44) | void flash_icache_disable(void)
function flash_prefetch_enable (line 49) | void flash_prefetch_enable(void)
function flash_prefetch_disable (line 54) | void flash_prefetch_disable(void)
function flash_dcache_reset (line 59) | void flash_dcache_reset(void)
function flash_icache_reset (line 64) | void flash_icache_reset(void)
function flash_clear_pgserr_flag (line 69) | void flash_clear_pgserr_flag(void)
function flash_clear_pgaerr_flag (line 74) | void flash_clear_pgaerr_flag(void)
function flash_clear_wrperr_flag (line 79) | void flash_clear_wrperr_flag(void)
function flash_clear_status_flags (line 84) | void flash_clear_status_flags(void)
function flash_unlock_option_bytes (line 94) | void flash_unlock_option_bytes(void)
function flash_lock_option_bytes (line 104) | void flash_lock_option_bytes(void)
function flash_program_double_word (line 109) | void flash_program_double_word(uint32_t address, uint64_t data)
function flash_program_word (line 128) | void flash_program_word(uint32_t address, uint32_t data)
function flash_program_half_word (line 147) | void flash_program_half_word(uint32_t address, uint16_t data)
function flash_program_byte (line 161) | void flash_program_byte(uint32_t address, uint8_t data)
function flash_program (line 175) | void flash_program(uint32_t address, uint8_t *data, uint32_t len)
function flash_erase_sector (line 186) | void flash_erase_sector(uint8_t sector, uint32_t program_size)
function flash_erase_all_sectors (line 201) | void flash_erase_all_sectors(uint32_t program_size)
function flash_program_option_bytes (line 213) | void flash_program_option_bytes(uint32_t data)
FILE: firmware/libopencm3/lib/stm32/common/gpio_common_all.c
function gpio_set (line 42) | void gpio_set(uint32_t gpioport, uint16_t gpios)
function gpio_clear (line 57) | void gpio_clear(uint32_t gpioport, uint16_t gpios)
function gpio_get (line 72) | uint16_t gpio_get(uint32_t gpioport, uint16_t gpios)
function gpio_toggle (line 87) | void gpio_toggle(uint32_t gpioport, uint16_t gpios)
function gpio_port_read (line 101) | uint16_t gpio_port_read(uint32_t gpioport)
function gpio_port_write (line 114) | void gpio_port_write(uint32_t gpioport, uint16_t data)
function gpio_port_config_lock (line 131) | void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios)
FILE: firmware/libopencm3/lib/stm32/common/gpio_common_f0234.c
function gpio_mode_setup (line 89) | void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down,
function gpio_set_output_options (line 132) | void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t s...
function gpio_set_af (line 178) | void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios)
FILE: firmware/libopencm3/lib/stm32/common/hash_common_f24.c
function hash_set_mode (line 43) | void hash_set_mode(uint8_t mode)
function hash_set_algorithm (line 57) | void hash_set_algorithm(uint8_t algorithm)
function hash_set_data_type (line 71) | void hash_set_data_type(uint8_t datatype)
function hash_set_key_length (line 85) | void hash_set_key_length(uint8_t keylength)
function hash_set_last_word_valid_bits (line 99) | void hash_set_last_word_valid_bits(uint8_t validbits)
function hash_init (line 112) | void hash_init()
function hash_add_data (line 125) | void hash_add_data(uint32_t data)
function hash_digest (line 137) | void hash_digest()
function hash_get_result (line 151) | void hash_get_result(uint32_t *data)
FILE: firmware/libopencm3/lib/stm32/common/i2c_common_all.c
function i2c_reset (line 52) | void i2c_reset(uint32_t i2c)
function i2c_peripheral_enable (line 72) | void i2c_peripheral_enable(uint32_t i2c)
function i2c_peripheral_disable (line 86) | void i2c_peripheral_disable(uint32_t i2c)
function i2c_send_start (line 101) | void i2c_send_start(uint32_t i2c)
function i2c_send_stop (line 115) | void i2c_send_stop(uint32_t i2c)
function i2c_clear_stop (line 127) | void i2c_clear_stop(uint32_t i2c)
function i2c_set_own_7bit_slave_address (line 141) | void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave)
function i2c_set_own_10bit_slave_address (line 159) | void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave)
function i2c_set_clock_frequency (line 177) | void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq)
function i2c_send_data (line 192) | void i2c_send_data(uint32_t i2c, uint8_t data)
function i2c_set_fast_mode (line 206) | void i2c_set_fast_mode(uint32_t i2c)
function i2c_set_standard_mode (line 220) | void i2c_set_standard_mode(uint32_t i2c)
function i2c_set_ccr (line 240) | void i2c_set_ccr(uint32_t i2c, uint16_t freq)
function i2c_set_trise (line 261) | void i2c_set_trise(uint32_t i2c, uint16_t trise)
function i2c_send_7bit_address (line 275) | void i2c_send_7bit_address(uint32_t i2c, uint8_t slave, uint8_t readwrite)
function i2c_get_data (line 285) | uint8_t i2c_get_data(uint32_t i2c)
function i2c_enable_interrupt (line 296) | void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt)
function i2c_disable_interrupt (line 307) | void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt)
function i2c_enable_ack (line 318) | void i2c_enable_ack(uint32_t i2c)
function i2c_disable_ack (line 329) | void i2c_disable_ack(uint32_t i2c)
function i2c_nack_next (line 340) | void i2c_nack_next(uint32_t i2c)
function i2c_nack_current (line 352) | void i2c_nack_current(uint32_t i2c)
function i2c_set_dutycycle (line 363) | void i2c_set_dutycycle(uint32_t i2c, uint32_t dutycycle)
function i2c_enable_dma (line 377) | void i2c_enable_dma(uint32_t i2c)
function i2c_disable_dma (line 387) | void i2c_disable_dma(uint32_t i2c)
function i2c_set_dma_last_transfer (line 397) | void i2c_set_dma_last_transfer(uint32_t i2c)
function i2c_clear_dma_last_transfer (line 407) | void i2c_clear_dma_last_transfer(uint32_t i2c)
FILE: firmware/libopencm3/lib/stm32/common/iwdg_common_all.c
function iwdg_start (line 53) | void iwdg_start(void)
function iwdg_set_period_ms (line 73) | void iwdg_set_period_ms(uint32_t period)
function iwdg_reload_busy (line 120) | bool iwdg_reload_busy(void)
function iwdg_prescaler_busy (line 132) | bool iwdg_prescaler_busy(void)
function iwdg_reset (line 144) | void iwdg_reset(void)
FILE: firmware/libopencm3/lib/stm32/common/pwr_common_all.c
function pwr_disable_backup_domain_write_protect (line 37) | void pwr_disable_backup_domain_write_protect(void)
function pwr_enable_backup_domain_write_protect (line 48) | void pwr_enable_backup_domain_write_protect(void)
function pwr_enable_power_voltage_detect (line 63) | void pwr_enable_power_voltage_detect(uint32_t pvd_level)
function pwr_disable_power_voltage_detect (line 74) | void pwr_disable_power_voltage_detect(void)
function pwr_clear_standby_flag (line 85) | void pwr_clear_standby_flag(void)
function pwr_clear_wakeup_flag (line 96) | void pwr_clear_wakeup_flag(void)
function pwr_set_standby_mode (line 106) | void pwr_set_standby_mode(void)
function pwr_set_stop_mode (line 116) | void pwr_set_stop_mode(void)
function pwr_voltage_regulator_on_in_stop (line 126) | void pwr_voltage_regulator_on_in_stop(void)
function pwr_voltage_regulator_low_power_in_stop (line 136) | void pwr_voltage_regulator_low_power_in_stop(void)
function pwr_enable_wakeup_pin (line 147) | void pwr_enable_wakeup_pin(void)
function pwr_disable_wakeup_pin (line 158) | void pwr_disable_wakeup_pin(void)
function pwr_voltage_high (line 173) | bool pwr_voltage_high(void)
function pwr_get_standby_flag (line 187) | bool pwr_get_standby_flag(void)
function pwr_get_wakeup_flag (line 201) | bool pwr_get_wakeup_flag(void)
FILE: firmware/libopencm3/lib/stm32/common/rtc_common_l1f024.c
function rtc_set_prescaler (line 36) | void rtc_set_prescaler(uint32_t sync, uint32_t async)
function rtc_wait_for_synchro (line 52) | void rtc_wait_for_synchro(void)
function rtc_unlock (line 70) | void rtc_unlock(void)
function rtc_lock (line 80) | void rtc_lock(void)
function rtc_set_wakeup_time (line 89) | void rtc_set_wakeup_time(uint16_t wkup_time, uint8_t rtc_cr_wucksel)
function rtc_clear_wakeup_flag (line 118) | void rtc_clear_wakeup_flag(void)
FILE: firmware/libopencm3/lib/stm32/common/spi_common_all.c
function spi_reset (line 82) | void spi_reset(uint32_t spi_peripheral)
function spi_enable (line 118) | void spi_enable(uint32_t spi)
function spi_disable (line 132) | void spi_disable(uint32_t spi)
function spi_clean_disable (line 152) | uint16_t spi_clean_disable(uint32_t spi)
function spi_write (line 179) | void spi_write(uint32_t spi, uint16_t data)
function spi_send (line 195) | void spi_send(uint32_t spi, uint16_t data)
function spi_read (line 213) | uint16_t spi_read(uint32_t spi)
function spi_xfer (line 233) | uint16_t spi_xfer(uint32_t spi, uint16_t data)
function spi_set_bidirectional_mode (line 253) | void spi_set_bidirectional_mode(uint32_t spi)
function spi_set_unidirectional_mode (line 268) | void spi_set_unidirectional_mode(uint32_t spi)
function spi_set_bidirectional_receive_only_mode (line 283) | void spi_set_bidirectional_receive_only_mode(uint32_t spi)
function spi_set_bidirectional_transmit_only_mode (line 299) | void spi_set_bidirectional_transmit_only_mode(uint32_t spi)
function spi_enable_crc (line 313) | void spi_enable_crc(uint32_t spi)
function spi_disable_crc (line 324) | void spi_disable_crc(uint32_t spi)
function spi_set_next_tx_from_buffer (line 339) | void spi_set_next_tx_from_buffer(uint32_t spi)
function spi_set_next_tx_from_crc (line 354) | void spi_set_next_tx_from_crc(uint32_t spi)
function spi_set_full_duplex_mode (line 365) | void spi_set_full_duplex_mode(uint32_t spi)
function spi_set_receive_only_mode (line 377) | void spi_set_receive_only_mode(uint32_t spi)
function spi_disable_software_slave_management (line 390) | void spi_disable_software_slave_management(uint32_t spi)
function spi_enable_software_slave_management (line 404) | void spi_enable_software_slave_management(uint32_t spi)
function spi_set_nss_high (line 421) | void spi_set_nss_high(uint32_t spi)
function spi_set_nss_low (line 435) | void spi_set_nss_low(uint32_t spi)
function spi_send_lsb_first (line 446) | void spi_send_lsb_first(uint32_t spi)
function spi_send_msb_first (line 457) | void spi_send_msb_first(uint32_t spi)
function spi_set_baudrate_prescaler (line 472) | void spi_set_baudrate_prescaler(uint32_t spi, uint8_t baudrate)
function spi_set_master_mode (line 491) | void spi_set_master_mode(uint32_t spi)
function spi_set_slave_mode (line 502) | void spi_set_slave_mode(uint32_t spi)
function spi_set_clock_polarity_1 (line 513) | void spi_set_clock_polarity_1(uint32_t spi)
function spi_set_clock_polarity_0 (line 524) | void spi_set_clock_polarity_0(uint32_t spi)
function spi_set_clock_phase_1 (line 535) | void spi_set_clock_phase_1(uint32_t spi)
function spi_set_clock_phase_0 (line 546) | void spi_set_clock_phase_0(uint32_t spi)
function spi_enable_tx_buffer_empty_interrupt (line 557) | void spi_enable_tx_buffer_empty_interrupt(uint32_t spi)
function spi_disable_tx_buffer_empty_interrupt (line 568) | void spi_disable_tx_buffer_empty_interrupt(uint32_t spi)
function spi_enable_rx_buffer_not_empty_interrupt (line 579) | void spi_enable_rx_buffer_not_empty_interrupt(uint32_t spi)
function spi_disable_rx_buffer_not_empty_interrupt (line 590) | void spi_disable_rx_buffer_not_empty_interrupt(uint32_t spi)
function spi_enable_error_interrupt (line 601) | void spi_enable_error_interrupt(uint32_t spi)
function spi_disable_error_interrupt (line 612) | void spi_disable_error_interrupt(uint32_t spi)
function spi_enable_ss_output (line 626) | void spi_enable_ss_output(uint32_t spi)
function spi_disable_ss_output (line 641) | void spi_disable_ss_output(uint32_t spi)
function spi_enable_tx_dma (line 656) | void spi_enable_tx_dma(uint32_t spi)
function spi_disable_tx_dma (line 667) | void spi_disable_tx_dma(uint32_t spi)
function spi_enable_rx_dma (line 682) | void spi_enable_rx_dma(uint32_t spi)
function spi_disable_rx_dma (line 693) | void spi_disable_rx_dma(uint32_t spi)
FILE: firmware/libopencm3/lib/stm32/common/spi_common_f124.c
function spi_init_master (line 92) | int spi_init_master(uint32_t spi, uint32_t br, uint32_t cpol, uint32_t c...
function spi_set_dff_8bit (line 121) | void spi_set_dff_8bit(uint32_t spi)
function spi_set_dff_16bit (line 132) | void spi_set_dff_16bit(uint32_t spi)
FILE: firmware/libopencm3/lib/stm32/common/timer_common_all.c
function timer_reset (line 116) | void timer_reset(uint32_t timer_peripheral)
function timer_enable_irq (line 201) | void timer_enable_irq(uint32_t timer_peripheral, uint32_t irq)
function timer_disable_irq (line 215) | void timer_disable_irq(uint32_t timer_peripheral, uint32_t irq)
function timer_interrupt_source (line 236) | bool timer_interrupt_source(uint32_t timer_peripheral, uint32_t flag)
function timer_get_flag (line 262) | bool timer_get_flag(uint32_t timer_peripheral, uint32_t flag)
function timer_clear_flag (line 279) | void timer_clear_flag(uint32_t timer_peripheral, uint32_t flag)
function timer_set_mode (line 312) | void timer_set_mode(uint32_t timer_peripheral, uint32_t clock_div,
function timer_set_clock_division (line 338) | void timer_set_clock_division(uint32_t timer_peripheral, uint32_t clock_...
function timer_enable_preload (line 355) | void timer_enable_preload(uint32_t timer_peripheral)
function timer_disable_preload (line 371) | void timer_disable_preload(uint32_t timer_peripheral)
function timer_set_alignment (line 386) | void timer_set_alignment(uint32_t timer_peripheral, uint32_t alignment)
function timer_direction_up (line 402) | void timer_direction_up(uint32_t timer_peripheral)
function timer_direction_down (line 416) | void timer_direction_down(uint32_t timer_peripheral)
function timer_one_shot_mode (line 428) | void timer_one_shot_mode(uint32_t timer_peripheral)
function timer_continuous_mode (line 440) | void timer_continuous_mode(uint32_t timer_peripheral)
function timer_update_on_any (line 457) | void timer_update_on_any(uint32_t timer_peripheral)
function timer_update_on_overflow (line 470) | void timer_update_on_overflow(uint32_t timer_peripheral)
function timer_enable_update_event (line 482) | void timer_enable_update_event(uint32_t timer_peripheral)
function timer_disable_update_event (line 496) | void timer_disable_update_event(uint32_t timer_peripheral)
function timer_enable_counter (line 510) | void timer_enable_counter(uint32_t timer_peripheral)
function timer_disable_counter (line 522) | void timer_disable_counter(uint32_t timer_peripheral)
function timer_set_output_idle_state (line 543) | void timer_set_output_idle_state(uint32_t timer_peripheral, uint32_t out...
function timer_reset_output_idle_state (line 570) | void timer_reset_output_idle_state(uint32_t timer_peripheral, uint32_t o...
function timer_set_ti1_ch123_xor (line 592) | void timer_set_ti1_ch123_xor(uint32_t timer_peripheral)
function timer_set_ti1_ch1 (line 606) | void timer_set_ti1_ch1(uint32_t timer_peripheral)
function timer_set_master_mode (line 622) | void timer_set_master_mode(uint32_t timer_peripheral, uint32_t mode)
function timer_set_dma_on_compare_event (line 637) | void timer_set_dma_on_compare_event(uint32_t timer_peripheral)
function timer_set_dma_on_update_event (line 651) | void timer_set_dma_on_update_event(uint32_t timer_peripheral)
function timer_enable_compare_control_update_on_trigger (line 670) | void timer_enable_compare_control_update_on_trigger(uint32_t timer_perip...
function timer_disable_compare_control_update_on_trigger (line 695) | void timer_disable_compare_control_update_on_trigger(uint32_t timer_peri...
function timer_enable_preload_complementry_enable_bits (line 719) | void timer_enable_preload_complementry_enable_bits(uint32_t timer_periph...
function timer_disable_preload_complementry_enable_bits (line 742) | void timer_disable_preload_complementry_enable_bits(uint32_t timer_perip...
function timer_set_prescaler (line 763) | void timer_set_prescaler(uint32_t timer_peripheral, uint32_t value)
function timer_set_repetition_counter (line 781) | void timer_set_repetition_counter(uint32_t timer_peripheral, uint32_t va...
function timer_set_period (line 803) | void timer_set_period(uint32_t timer_peripheral, uint32_t period)
function timer_enable_oc_clear (line 822) | void timer_enable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc_id)
function timer_disable_oc_clear (line 856) | void timer_disable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc...
function timer_set_oc_fast_mode (line 895) | void timer_set_oc_fast_mode(uint32_t timer_peripheral, enum tim_oc_id oc...
function timer_set_oc_slow_mode (line 930) | void timer_set_oc_slow_mode(uint32_t timer_peripheral, enum tim_oc_id oc...
function timer_set_oc_mode (line 980) | void timer_set_oc_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id,
function timer_enable_oc_preload (line 1129) | void timer_enable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id o...
function timer_disable_oc_preload (line 1161) | void timer_disable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id ...
function timer_set_oc_polarity_high (line 1196) | void timer_set_oc_polarity_high(uint32_t timer_peripheral, enum tim_oc_i...
function timer_set_oc_polarity_low (line 1258) | void timer_set_oc_polarity_low(uint32_t timer_peripheral, enum tim_oc_id...
function timer_enable_oc_output (line 1320) | void timer_enable_oc_output(uint32_t timer_peripheral, enum tim_oc_id oc...
function timer_disable_oc_output (line 1382) | void timer_disable_oc_output(uint32_t timer_peripheral, enum tim_oc_id o...
function timer_set_oc_idle_state_set (line 1447) | void timer_set_oc_idle_state_set(uint32_t timer_peripheral,
function timer_set_oc_idle_state_unset (line 1500) | void timer_set_oc_idle_state_unset(uint32_t timer_peripheral,
function timer_set_oc_value (line 1551) | void timer_set_oc_value(uint32_t timer_peripheral, enum tim_oc_id oc_id,
function timer_enable_break_main_output (line 1591) | void timer_enable_break_main_output(uint32_t timer_peripheral)
function timer_disable_break_main_output (line 1614) | void timer_disable_break_main_output(uint32_t timer_peripheral)
function timer_enable_break_automatic_output (line 1638) | void timer_enable_break_automatic_output(uint32_t timer_peripheral)
function timer_disable_break_automatic_output (line 1662) | void timer_disable_break_automatic_output(uint32_t timer_peripheral)
function timer_set_break_polarity_high (line 1684) | void timer_set_break_polarity_high(uint32_t timer_peripheral)
function timer_set_break_polarity_low (line 1706) | void timer_set_break_polarity_low(uint32_t timer_peripheral)
function timer_enable_break (line 1728) | void timer_enable_break(uint32_t timer_peripheral)
function timer_disable_break (line 1750) | void timer_disable_break(uint32_t timer_peripheral)
function timer_set_enabled_off_state_in_run_mode (line 1776) | void timer_set_enabled_off_state_in_run_mode(uint32_t timer_peripheral)
function timer_set_disabled_off_state_in_run_mode (line 1801) | void timer_set_disabled_off_state_in_run_mode(uint32_t timer_peripheral)
function timer_set_enabled_off_state_in_idle_mode (line 1825) | void timer_set_enabled_off_state_in_idle_mode(uint32_t timer_peripheral)
function timer_set_disabled_off_state_in_idle_mode (line 1848) | void timer_set_disabled_off_state_in_idle_mode(uint32_t timer_peripheral)
function timer_set_break_lock (line 1873) | void timer_set_break_lock(uint32_t timer_peripheral, uint32_t lock)
function timer_set_deadtime (line 1905) | void timer_set_deadtime(uint32_t timer_peripheral, uint32_t deadtime)
function timer_generate_event (line 1930) | void timer_generate_event(uint32_t timer_peripheral, uint32_t event)
function timer_get_counter (line 1944) | uint32_t timer_get_counter(uint32_t timer_peripheral)
function timer_set_counter (line 1958) | void timer_set_counter(uint32_t timer_peripheral, uint32_t count)
function timer_ic_set_filter (line 1977) | void timer_ic_set_filter(uint32_t timer_peripheral, enum tim_ic_id ic,
function timer_ic_set_prescaler (line 2010) | void timer_ic_set_prescaler(uint32_t timer_peripheral, enum tim_ic_id ic,
function timer_ic_set_input (line 2054) | void timer_ic_set_input(uint32_t timer_peripheral, enum tim_ic_id ic,
function timer_ic_enable (line 2092) | void timer_ic_enable(uint32_t timer_peripheral, enum tim_ic_id ic)
function timer_ic_disable (line 2104) | void timer_ic_disable(uint32_t timer_peripheral, enum tim_ic_id ic)
function timer_slave_set_filter (line 2122) | void timer_slave_set_filter(uint32_t timer_peripheral, enum tim_ic_filte...
function timer_slave_set_prescaler (line 2137) | void timer_slave_set_prescaler(uint32_t timer_peripheral, enum tim_ic_ps...
function timer_slave_set_polarity (line 2150) | void timer_slave_set_polarity(uint32_t timer_peripheral, enum tim_et_pol...
function timer_slave_set_mode (line 2166) | void timer_slave_set_mode(uint32_t timer_peripheral, uint8_t mode)
function timer_slave_set_trigger (line 2179) | void timer_slave_set_trigger(uint32_t timer_peripheral, uint8_t trigger)
FILE: firmware/libopencm3/lib/stm32/common/timer_common_f234.c
function timer_ic_set_polarity (line 39) | void timer_ic_set_polarity(uint32_t timer_peripheral, enum tim_ic_id ic,
FILE: firmware/libopencm3/lib/stm32/common/timer_common_f24.c
function timer_set_option (line 40) | void timer_set_option(uint32_t timer_peripheral, uint32_t option)
FILE: firmware/libopencm3/lib/stm32/common/usart_common_all.c
function usart_set_baudrate (line 49) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 88) | void usart_set_databits(uint32_t usart, uint32_t bits)
function usart_set_stopbits (line 107) | void usart_set_stopbits(uint32_t usart, uint32_t stopbits)
function usart_set_parity (line 126) | void usart_set_parity(uint32_t usart, uint32_t parity)
function usart_set_mode (line 145) | void usart_set_mode(uint32_t usart, uint32_t mode)
function usart_set_flow_control (line 164) | void usart_set_flow_control(uint32_t usart, uint32_t flowcontrol)
function usart_enable (line 180) | void usart_enable(uint32_t usart)
function usart_disable (line 194) | void usart_disable(uint32_t usart)
function usart_send_blocking (line 210) | void usart_send_blocking(uint32_t usart, uint16_t data)
function usart_recv_blocking (line 226) | uint16_t usart_recv_blocking(uint32_t usart)
function usart_enable_rx_dma (line 246) | void usart_enable_rx_dma(uint32_t usart)
function usart_disable_rx_dma (line 258) | void usart_disable_rx_dma(uint32_t usart)
function usart_enable_tx_dma (line 276) | void usart_enable_tx_dma(uint32_t usart)
function usart_disable_tx_dma (line 288) | void usart_disable_tx_dma(uint32_t usart)
function usart_enable_rx_interrupt (line 300) | void usart_enable_rx_interrupt(uint32_t usart)
function usart_disable_rx_interrupt (line 313) | void usart_disable_rx_interrupt(uint32_t usart)
function usart_enable_tx_interrupt (line 325) | void usart_enable_tx_interrupt(uint32_t usart)
function usart_disable_tx_interrupt (line 337) | void usart_disable_tx_interrupt(uint32_t usart)
function usart_enable_error_interrupt (line 349) | void usart_enable_error_interrupt(uint32_t usart)
function usart_disable_error_interrupt (line 361) | void usart_disable_error_interrupt(uint32_t usart)
FILE: firmware/libopencm3/lib/stm32/common/usart_common_f124.c
function usart_send (line 44) | void usart_send(uint32_t usart, uint16_t data)
function usart_recv (line 61) | uint16_t usart_recv(uint32_t usart)
function usart_wait_send_ready (line 77) | void usart_wait_send_ready(uint32_t usart)
function usart_wait_recv_ready (line 92) | void usart_wait_recv_ready(uint32_t usart)
function usart_get_flag (line 107) | bool usart_get_flag(uint32_t usart, uint32_t flag)
function usart_get_interrupt_source (line 129) | bool usart_get_interrupt_source(uint32_t usart, uint32_t flag)
FILE: firmware/libopencm3/lib/stm32/desig.c
function desig_get_flash_size (line 22) | uint16_t desig_get_flash_size(void)
function desig_get_unique_id (line 27) | void desig_get_unique_id(uint32_t result[])
function desig_get_unique_id_as_string (line 40) | void desig_get_unique_id_as_string(char *string,
FILE: firmware/libopencm3/lib/stm32/f0/adc.c
function adc_set_continuous_conversion_mode (line 57) | void adc_set_continuous_conversion_mode(uint32_t adc)
function adc_set_single_conversion_mode (line 71) | void adc_set_single_conversion_mode(uint32_t adc)
function adc_enable_discontinuous_mode (line 82) | void adc_enable_discontinuous_mode(uint32_t adc)
function adc_disable_discontinuous_mode (line 93) | void adc_disable_discontinuous_mode(uint32_t adc)
function adc_set_operation_mode (line 155) | void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode)
function adc_start_conversion_regular (line 195) | void adc_start_conversion_regular(uint32_t adc)
function adc_eoc (line 214) | bool adc_eoc(uint32_t adc)
function adc_read_regular (line 230) | uint32_t adc_read_regular(uint32_t adc)
function adc_enable_external_trigger_regular (line 261) | void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger,
function adc_disable_external_trigger_regular (line 274) | void adc_disable_external_trigger_regular(uint32_t adc)
function adc_enable_watchdog_interrupt (line 298) | void adc_enable_watchdog_interrupt(uint32_t adc)
function adc_disable_watchdog_interrupt (line 309) | void adc_disable_watchdog_interrupt(uint32_t adc)
function adc_get_watchdog_flag (line 324) | bool adc_get_watchdog_flag(uint32_t adc)
function adc_clear_watchdog_flag (line 335) | void adc_clear_watchdog_flag(uint32_t adc)
function adc_enable_overrun_interrupt (line 350) | void adc_enable_overrun_interrupt(uint32_t adc)
function adc_disable_overrun_interrupt (line 361) | void adc_disable_overrun_interrupt(uint32_t adc)
function adc_get_overrun_flag (line 376) | bool adc_get_overrun_flag(uint32_t adc)
function adc_clear_overrun_flag (line 392) | void adc_clear_overrun_flag(uint32_t adc)
function adc_enable_eoc_sequence_interrupt (line 403) | void adc_enable_eoc_sequence_interrupt(uint32_t adc)
function adc_disable_eoc_sequence_interrupt (line 414) | void adc_disable_eoc_sequence_interrupt(uint32_t adc)
function adc_get_eoc_sequence_flag (line 425) | bool adc_get_eoc_sequence_flag(uint32_t adc)
function adc_enable_eoc_interrupt (line 436) | void adc_enable_eoc_interrupt(uint32_t adc)
function adc_disable_eoc_interrupt (line 447) | void adc_disable_eoc_interrupt(uint32_t adc)
function adc_power_off (line 472) | void adc_power_off(uint32_t adc)
function adc_power_on (line 487) | void adc_power_on(uint32_t adc)
function adc_set_clk_source (line 501) | void adc_set_clk_source(uint32_t adc, uint32_t source)
function adc_set_regular_sequence (line 523) | void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t chan...
function adc_set_sample_time_on_all_channels (line 567) | void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
function adc_set_resolution (line 582) | void adc_set_resolution(uint32_t adc, uint16_t resolution)
function adc_set_left_aligned (line 593) | void adc_set_left_aligned(uint32_t adc)
function adc_set_right_aligned (line 604) | void adc_set_right_aligned(uint32_t adc)
function adc_enable_dma (line 615) | void adc_enable_dma(uint32_t adc)
function adc_disable_dma (line 626) | void adc_disable_dma(uint32_t adc)
function adc_enable_temperature_sensor (line 637) | void adc_enable_temperature_sensor(void)
function adc_disable_temperature_sensor (line 649) | void adc_disable_temperature_sensor(void)
function adc_enable_vref_sensor (line 660) | void adc_enable_vref_sensor(void)
function adc_disable_vref_sensor (line 672) | void adc_disable_vref_sensor(void)
function adc_enable_vbat_sensor (line 683) | void adc_enable_vbat_sensor(void)
function adc_disable_vbat_sensor (line 695) | void adc_disable_vbat_sensor(void)
function adc_calibrate_start (line 706) | void adc_calibrate_start(uint32_t adc)
function adc_calibrate_wait_finish (line 717) | void adc_calibrate_wait_finish(uint32_t adc)
function adc_enable_analog_watchdog_on_all_channels (line 776) | void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
function adc_enable_analog_watchdog_on_selected_channel (line 789) | void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_...
function adc_disable_analog_watchdog (line 802) | void adc_disable_analog_watchdog(uint32_t adc)
function adc_set_watchdog_high_threshold (line 814) | void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold)
function adc_set_watchdog_low_threshold (line 826) | void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold)
FILE: firmware/libopencm3/lib/stm32/f0/comparator.c
function comp_enable (line 33) | void comp_enable(uint8_t id)
function comp_disable (line 38) | void comp_disable(uint8_t id)
function comp_select_input (line 43) | void comp_select_input(uint8_t id, uint32_t input)
function comp_select_output (line 48) | void comp_select_output(uint8_t id, uint32_t output)
function comp_select_hyst (line 53) | void comp_select_hyst(uint8_t id, uint32_t hyst)
function comp_select_speed (line 58) | void comp_select_speed(uint8_t id, uint32_t speed)
FILE: firmware/libopencm3/lib/stm32/f0/flash.c
function flash_prefetch_buffer_enable (line 22) | void flash_prefetch_buffer_enable(void)
function flash_prefetch_buffer_disable (line 27) | void flash_prefetch_buffer_disable(void)
function flash_set_ws (line 32) | void flash_set_ws(uint32_t ws)
function flash_wait_busy (line 37) | void flash_wait_busy(void)
function flash_program_u32 (line 42) | void flash_program_u32(uint32_t address, uint32_t data)
function flash_program_u16 (line 59) | void flash_program_u16(uint32_t address, uint16_t data)
function flash_erase_page (line 72) | void flash_erase_page(uint32_t page_address)
function flash_erase_all_pages (line 84) | void flash_erase_all_pages(void)
FILE: firmware/libopencm3/lib/stm32/f0/rcc.c
function rcc_osc_ready_int_clear (line 55) | void rcc_osc_ready_int_clear(enum rcc_osc osc)
function rcc_osc_ready_int_enable (line 85) | void rcc_osc_ready_int_enable(enum rcc_osc osc)
function rcc_osc_ready_int_disable (line 115) | void rcc_osc_ready_int_disable(enum rcc_osc osc)
function rcc_osc_ready_int_flag (line 146) | int rcc_osc_ready_int_flag(enum rcc_osc osc)
function rcc_css_int_clear (line 176) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 187) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 198) | void rcc_wait_for_osc_ready(enum rcc_osc osc)
function rcc_osc_on (line 234) | void rcc_osc_on(enum rcc_osc osc)
function rcc_osc_off (line 269) | void rcc_osc_off(enum rcc_osc osc)
function rcc_css_enable (line 297) | void rcc_css_enable(void)
function rcc_css_disable (line 306) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 322) | void rcc_osc_bypass_enable(enum rcc_osc osc)
function rcc_osc_bypass_disable (line 351) | void rcc_osc_bypass_disable(enum rcc_osc osc)
function rcc_set_sysclk_source (line 376) | void rcc_set_sysclk_source(enum rcc_osc clk)
function rcc_set_pll_multiplication_factor (line 404) | void rcc_set_pll_multiplication_factor(uint32_t mul)
function rcc_set_ppre (line 418) | void rcc_set_ppre(uint32_t ppre)
function rcc_set_hpre (line 429) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_prediv (line 435) | void rcc_set_prediv(uint32_t prediv)
function rcc_set_mco (line 441) | void rcc_set_mco(uint32_t mcosrc)
function rcc_system_clock_source (line 452) | enum rcc_osc rcc_system_clock_source(void)
function rcc_clock_setup_in_hsi_out_8mhz (line 467) | void rcc_clock_setup_in_hsi_out_8mhz(void)
function rcc_clock_setup_in_hsi_out_16mhz (line 482) | void rcc_clock_setup_in_hsi_out_16mhz(void)
function rcc_clock_setup_in_hsi_out_24mhz (line 507) | void rcc_clock_setup_in_hsi_out_24mhz(void)
function rcc_clock_setup_in_hsi_out_32mhz (line 531) | void rcc_clock_setup_in_hsi_out_32mhz(void)
function rcc_clock_setup_in_hsi_out_40mhz (line 555) | void rcc_clock_setup_in_hsi_out_40mhz(void)
function rcc_clock_setup_in_hsi_out_48mhz (line 579) | void rcc_clock_setup_in_hsi_out_48mhz(void)
function rcc_periph_clock_enable (line 607) | void rcc_periph_clock_enable(enum rcc_periph_clken periph)
function rcc_periph_clock_disable (line 612) | void rcc_periph_clock_disable(enum rcc_periph_clken periph)
function rcc_periph_reset_pulse (line 617) | void rcc_periph_reset_pulse(enum rcc_periph_rst periph)
function rcc_periph_reset_hold (line 623) | void rcc_periph_reset_hold(enum rcc_periph_rst periph)
function rcc_periph_reset_release (line 628) | void rcc_periph_reset_release(enum rcc_periph_rst periph)
FILE: firmware/libopencm3/lib/stm32/f0/spi.c
function spi_set_data_size (line 35) | void spi_set_data_size(uint32_t spi, uint16_t data_s)
function spi_fifo_reception_threshold_8bit (line 41) | void spi_fifo_reception_threshold_8bit(uint32_t spi)
function spi_fifo_reception_threshold_16bit (line 46) | void spi_fifo_reception_threshold_16bit(uint32_t spi)
function spi_i2s_mode_spi_mode (line 51) | void spi_i2s_mode_spi_mode(uint32_t spi)
FILE: firmware/libopencm3/lib/stm32/f0/usart.c
function usart_set_baudrate (line 42) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 67) | void usart_set_databits(uint32_t usart, uint32_t bits)
function usart_set_stopbits (line 86) | void usart_set_stopbits(uint32_t usart, uint32_t stopbits)
function usart_set_parity (line 101) | void usart_set_parity(uint32_t usart, uint32_t parity)
function usart_set_mode (line 116) | void usart_set_mode(uint32_t usart, uint32_t mode)
function usart_set_flow_control (line 132) | void usart_set_flow_control(uint32_t usart, uint32_t flowctrl)
function usart_enable (line 144) | void usart_enable(uint32_t usart)
function usart_disable (line 158) | void usart_disable(uint32_t usart)
function usart_send (line 171) | void usart_send(uint32_t usart, uint8_t data)
function usart_recv (line 187) | uint8_t usart_recv(uint32_t usart)
function usart_wait_send_ready (line 203) | void usart_wait_send_ready(uint32_t usart)
function usart_wait_recv_ready (line 218) | void usart_wait_recv_ready(uint32_t usart)
function usart_send_blocking (line 235) | void usart_send_blocking(uint32_t usart, uint8_t data)
function usart_recv_blocking (line 251) | uint8_t usart_recv_blocking(uint32_t usart)
function usart_enable_rx_dma (line 269) | void usart_enable_rx_dma(uint32_t usart)
function usart_disable_rx_dma (line 281) | void usart_disable_rx_dma(uint32_t usart)
function usart_enable_tx_dma (line 297) | void usart_enable_tx_dma(uint32_t usart)
function usart_disable_tx_dma (line 309) | void usart_disable_tx_dma(uint32_t usart)
function usart_enable_rx_interrupt (line 321) | void usart_enable_rx_interrupt(uint32_t usart)
function usart_disable_rx_interrupt (line 334) | void usart_disable_rx_interrupt(uint32_t usart)
function usart_enable_tx_interrupt (line 346) | void usart_enable_tx_interrupt(uint32_t usart)
function usart_disable_tx_interrupt (line 358) | void usart_disable_tx_interrupt(uint32_t usart)
function usart_enable_error_interrupt (line 370) | void usart_enable_error_interrupt(uint32_t usart)
function usart_disable_error_interrupt (line 382) | void usart_disable_error_interrupt(uint32_t usart)
function usart_get_flag (line 396) | bool usart_get_flag(uint32_t usart, uint32_t flag)
function usart_get_interrupt_source (line 414) | bool usart_get_interrupt_source(uint32_t usart, uint32_t flag)
FILE: firmware/libopencm3/lib/stm32/f1/adc.c
function adc_power_on (line 125) | void adc_power_on(uint32_t adc)
function adc_start_conversion_direct (line 145) | void adc_start_conversion_direct(uint32_t adc)
function adc_set_dual_mode (line 189) | void adc_set_dual_mode(uint32_t mode)
function adc_eoc (line 205) | bool adc_eoc(uint32_t adc)
function adc_eoc_injected (line 220) | bool adc_eoc_injected(uint32_t adc)
function adc_read_regular (line 237) | uint32_t adc_read_regular(uint32_t adc)
function adc_read_injected (line 256) | uint32_t adc_read_injected(uint32_t adc, uint8_t reg)
function adc_set_injected_offset (line 284) | void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset)
function adc_enable_analog_watchdog_regular (line 313) | void adc_enable_analog_watchdog_regular(uint32_t adc)
function adc_disable_analog_watchdog_regular (line 325) | void adc_disable_analog_watchdog_regular(uint32_t adc)
function adc_enable_analog_watchdog_injected (line 341) | void adc_enable_analog_watchdog_injected(uint32_t adc)
function adc_disable_analog_watchdog_injected (line 353) | void adc_disable_analog_watchdog_injected(uint32_t adc)
function adc_enable_discontinuous_mode_regular (line 375) | void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length)
function adc_disable_discontinuous_mode_regular (line 391) | void adc_disable_discontinuous_mode_regular(uint32_t adc)
function adc_enable_discontinuous_mode_injected (line 407) | void adc_enable_discontinuous_mode_injected(uint32_t adc)
function adc_disable_discontinuous_mode_injected (line 419) | void adc_disable_discontinuous_mode_injected(uint32_t adc)
function adc_enable_automatic_injected_group_conversion (line 435) | void adc_enable_automatic_injected_group_conversion(uint32_t adc)
function adc_disable_automatic_injected_group_conversion (line 448) | void adc_disable_automatic_injected_group_conversion(uint32_t adc)
function adc_enable_analog_watchdog_on_all_channels (line 470) | void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
function adc_enable_analog_watchdog_on_selected_channel (line 493) | void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc,
function adc_enable_scan_mode (line 517) | void adc_enable_scan_mode(uint32_t adc)
function adc_disable_scan_mode (line 528) | void adc_disable_scan_mode(uint32_t adc)
function adc_enable_eoc_interrupt_injected (line 540) | void adc_enable_eoc_interrupt_injected(uint32_t adc)
function adc_disable_eoc_interrupt_injected (line 552) | void adc_disable_eoc_interrupt_injected(uint32_t adc)
function adc_enable_awd_interrupt (line 564) | void adc_enable_awd_interrupt(uint32_t adc)
function adc_disable_awd_interrupt (line 576) | void adc_disable_awd_interrupt(uint32_t adc)
function adc_enable_eoc_interrupt (line 588) | void adc_enable_eoc_interrupt(uint32_t adc)
function adc_disable_eoc_interrupt (line 600) | void adc_disable_eoc_interrupt(uint32_t adc)
function adc_enable_temperature_sensor (line 615) | void adc_enable_temperature_sensor(uint32_t adc)
function adc_disable_temperature_sensor (line 630) | void adc_disable_temperature_sensor(uint32_t adc)
function adc_start_conversion_regular (line 650) | void adc_start_conversion_regular(uint32_t adc)
function adc_start_conversion_injected (line 674) | void adc_start_conversion_injected(uint32_t adc)
function adc_enable_external_trigger_regular (line 714) | void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger)
function adc_disable_external_trigger_regular (line 731) | void adc_disable_external_trigger_regular(uint32_t adc)
function adc_enable_external_trigger_injected (line 767) | void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger)
function adc_disable_external_trigger_injected (line 785) | void adc_disable_external_trigger_injected(uint32_t adc)
function adc_set_left_aligned (line 797) | void adc_set_left_aligned(uint32_t adc)
function adc_set_right_aligned (line 809) | void adc_set_right_aligned(uint32_t adc)
function adc_enable_dma (line 825) | void adc_enable_dma(uint32_t adc)
function adc_disable_dma (line 839) | void adc_disable_dma(uint32_t adc)
function adc_reset_calibration (line 856) | void adc_reset_calibration(uint32_t adc)
function adc_calibration (line 876) | void adc_calibration(uint32_t adc)
function adc_set_continuous_conversion_mode (line 892) | void adc_set_continuous_conversion_mode(uint32_t adc)
function adc_set_single_conversion_mode (line 907) | void adc_set_single_conversion_mode(uint32_t adc)
function adc_on (line 925) | void adc_on(uint32_t adc)
function adc_off (line 939) | void adc_off(uint32_t adc)
function adc_set_sample_time (line 956) | void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time)
function adc_set_sample_time_on_all_channels (line 984) | void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
function adc_set_watchdog_high_threshold (line 1008) | void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold)
function adc_set_watchdog_low_threshold (line 1025) | void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold)
function adc_set_regular_sequence (line 1048) | void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t chan...
function adc_set_injected_sequence (line 1089) | void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t cha...
FILE: firmware/libopencm3/lib/stm32/f1/ethernet.c
function eth_smi_write (line 22) | void eth_smi_write(uint8_t phy, uint8_t reg, uint16_t data)
function eth_smi_read (line 38) | uint16_t eth_smi_read(uint8_t phy, uint8_t reg)
FILE: firmware/libopencm3/lib/stm32/f1/flash.c
function flash_prefetch_buffer_enable (line 23) | void flash_prefetch_buffer_enable(void)
function flash_prefetch_buffer_disable (line 28) | void flash_prefetch_buffer_disable(void)
function flash_halfcycle_enable (line 33) | void flash_halfcycle_enable(void)
function flash_halfcycle_disable (line 38) | void flash_halfcycle_disable(void)
function flash_set_ws (line 43) | void flash_set_ws(uint32_t ws)
function flash_unlock (line 53) | void flash_unlock(void)
function flash_lock (line 63) | void flash_lock(void)
function flash_clear_pgerr_flag (line 68) | void flash_clear_pgerr_flag(void)
function flash_clear_eop_flag (line 73) | void flash_clear_eop_flag(void)
function flash_clear_wrprterr_flag (line 78) | void flash_clear_wrprterr_flag(void)
function flash_clear_bsy_flag (line 83) | void flash_clear_bsy_flag(void)
function flash_clear_status_flags (line 88) | void flash_clear_status_flags(void)
function flash_get_status_flags (line 96) | uint32_t flash_get_status_flags(void)
function flash_unlock_option_bytes (line 104) | void flash_unlock_option_bytes(void)
function flash_wait_for_last_operation (line 111) | void flash_wait_for_last_operation(void)
function flash_program_word (line 116) | void flash_program_word(uint32_t address, uint32_t data)
function flash_program_half_word (line 140) | void flash_program_half_word(uint32_t address, uint16_t data)
function flash_erase_page (line 153) | void flash_erase_page(uint32_t page_address)
function flash_erase_all_pages (line 165) | void flash_erase_all_pages(void)
function flash_erase_option_bytes (line 176) | void flash_erase_option_bytes(void)
function flash_program_option_bytes (line 190) | void flash_program_option_bytes(uint32_t address, uint16_t data)
FILE: firmware/libopencm3/lib/stm32/f1/gpio.c
function gpio_set_mode (line 95) | void gpio_set_mode(uint32_t gpioport, uint8_t mode, uint8_t cnf, uint16_...
function gpio_set_eventout (line 141) | void gpio_set_eventout(uint8_t evoutport, uint8_t evoutpin)
function gpio_primary_remap (line 169) | void gpio_primary_remap(uint32_t swjdisable, uint32_t maps)
function gpio_secondary_remap (line 188) | void gpio_secondary_remap(uint32_t maps)
FILE: firmware/libopencm3/lib/stm32/f1/rcc.c
function rcc_osc_ready_int_clear (line 70) | void rcc_osc_ready_int_clear(osc_t osc)
function rcc_osc_ready_int_enable (line 103) | void rcc_osc_ready_int_enable(osc_t osc)
function rcc_osc_ready_int_disable (line 136) | void rcc_osc_ready_int_disable(osc_t osc)
function rcc_osc_ready_int_flag (line 170) | int rcc_osc_ready_int_flag(osc_t osc)
function rcc_css_int_clear (line 204) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 215) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 226) | void rcc_wait_for_osc_ready(osc_t osc)
function rcc_osc_on (line 268) | void rcc_osc_on(osc_t osc)
function rcc_osc_off (line 309) | void rcc_osc_off(osc_t osc)
function rcc_css_enable (line 341) | void rcc_css_enable(void)
function rcc_css_disable (line 351) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 370) | void rcc_osc_bypass_enable(osc_t osc)
function rcc_osc_bypass_disable (line 403) | void rcc_osc_bypass_disable(osc_t osc)
function rcc_peripheral_enable_clock (line 438) | void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_disable_clock (line 460) | void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_reset (line 481) | void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
function rcc_peripheral_clear_reset (line 502) | void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_r...
function rcc_set_sysclk_source (line 513) | void rcc_set_sysclk_source(uint32_t clk)
function rcc_set_pll_multiplication_factor (line 530) | void rcc_set_pll_multiplication_factor(uint32_t mul)
function rcc_set_pll2_multiplication_factor (line 547) | void rcc_set_pll2_multiplication_factor(uint32_t mul)
function rcc_set_pll3_multiplication_factor (line 564) | void rcc_set_pll3_multiplication_factor(uint32_t mul)
function rcc_set_pll_source (line 581) | void rcc_set_pll_source(uint32_t pllsrc)
function rcc_set_pllxtpre (line 598) | void rcc_set_pllxtpre(uint32_t pllxtpre)
function rcc_set_adcpre (line 615) | void rcc_set_adcpre(uint32_t adcpre)
function rcc_set_ppre2 (line 630) | void rcc_set_ppre2(uint32_t ppre2)
function rcc_set_ppre1 (line 647) | void rcc_set_ppre1(uint32_t ppre1)
function rcc_set_hpre (line 662) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_usbpre (line 682) | void rcc_set_usbpre(uint32_t usbpre)
function rcc_set_prediv1 (line 691) | void rcc_set_prediv1(uint32_t prediv)
function rcc_set_prediv2 (line 699) | void rcc_set_prediv2(uint32_t prediv)
function rcc_set_prediv1_source (line 707) | void rcc_set_prediv1_source(uint32_t rccsrc)
function rcc_set_mco (line 713) | void rcc_set_mco(uint32_t mcosrc)
function rcc_system_clock_source (line 730) | uint32_t rcc_system_clock_source(void)
function rcc_clock_setup_in_hsi_out_64mhz (line 746) | void rcc_clock_setup_in_hsi_out_64mhz(void)
function rcc_clock_setup_in_hsi_out_48mhz (line 798) | void rcc_clock_setup_in_hsi_out_48mhz(void)
function rcc_clock_setup_in_hsi_out_24mhz (line 851) | void rcc_clock_setup_in_hsi_out_24mhz(void)
function rcc_clock_setup_in_hse_8mhz_out_24mhz (line 903) | void rcc_clock_setup_in_hse_8mhz_out_24mhz(void)
function rcc_clock_setup_in_hse_8mhz_out_72mhz (line 966) | void rcc_clock_setup_in_hse_8mhz_out_72mhz(void)
function rcc_clock_setup_in_hse_12mhz_out_72mhz (line 1029) | void rcc_clock_setup_in_hse_12mhz_out_72mhz(void)
function rcc_clock_setup_in_hse_16mhz_out_72mhz (line 1092) | void rcc_clock_setup_in_hse_16mhz_out_72mhz(void)
function rcc_clock_setup_in_hse_25mhz_out_72mhz (line 1155) | void rcc_clock_setup_in_hse_25mhz_out_72mhz(void)
function rcc_backupdomain_reset (line 1213) | void rcc_backupdomain_reset(void)
FILE: firmware/libopencm3/lib/stm32/f1/rtc.c
function rtc_awake_from_off (line 41) | void rtc_awake_from_off(osc_t clock_source)
function rtc_enter_config_mode (line 107) | void rtc_enter_config_mode(void)
function rtc_exit_config_mode (line 118) | void rtc_exit_config_mode(void)
function rtc_set_alarm_time (line 129) | void rtc_set_alarm_time(uint32_t alarm_time)
function rtc_enable_alarm (line 137) | void rtc_enable_alarm(void)
function rtc_disable_alarm (line 144) | void rtc_disable_alarm(void)
function rtc_set_prescale_val (line 151) | void rtc_set_prescale_val(uint32_t prescale_val)
function rtc_get_counter_val (line 159) | uint32_t rtc_get_counter_val(void)
function rtc_get_prescale_div_val (line 164) | uint32_t rtc_get_prescale_div_val(void)
function rtc_get_alarm_val (line 169) | uint32_t rtc_get_alarm_val(void)
function rtc_set_counter_val (line 174) | void rtc_set_counter_val(uint32_t counter_val)
function rtc_interrupt_enable (line 182) | void rtc_interrupt_enable(rtcflag_t flag_val)
function rtc_interrupt_disable (line 202) | void rtc_interrupt_disable(rtcflag_t flag_val)
function rtc_clear_flag (line 222) | void rtc_clear_flag(rtcflag_t flag_val)
function rtc_check_flag (line 240) | uint32_t rtc_check_flag(rtcflag_t flag_val)
function rtc_awake_from_standby (line 263) | void rtc_awake_from_standby(void)
function rtc_auto_awake (line 282) | void rtc_auto_awake(osc_t clock_source, uint32_t prescale_val)
FILE: firmware/libopencm3/lib/stm32/f1/timer.c
function timer_ic_set_polarity (line 49) | void timer_ic_set_polarity(uint32_t timer_peripheral, enum tim_ic_id ic,
FILE: firmware/libopencm3/lib/stm32/f2/rcc.c
function rcc_osc_ready_int_clear (line 46) | void rcc_osc_ready_int_clear(osc_t osc)
function rcc_osc_ready_int_enable (line 67) | void rcc_osc_ready_int_enable(osc_t osc)
function rcc_osc_ready_int_disable (line 88) | void rcc_osc_ready_int_disable(osc_t osc)
function rcc_osc_ready_int_flag (line 109) | int rcc_osc_ready_int_flag(osc_t osc)
function rcc_css_int_clear (line 132) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 137) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 142) | void rcc_wait_for_osc_ready(osc_t osc)
function rcc_wait_for_sysclk_status (line 163) | void rcc_wait_for_sysclk_status(osc_t osc)
function rcc_osc_on (line 181) | void rcc_osc_on(osc_t osc)
function rcc_osc_off (line 202) | void rcc_osc_off(osc_t osc)
function rcc_css_enable (line 223) | void rcc_css_enable(void)
function rcc_css_disable (line 228) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 233) | void rcc_osc_bypass_enable(osc_t osc)
function rcc_osc_bypass_disable (line 250) | void rcc_osc_bypass_disable(osc_t osc)
function rcc_peripheral_enable_clock (line 267) | void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_disable_clock (line 272) | void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_reset (line 277) | void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
function rcc_peripheral_clear_reset (line 282) | void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_r...
function rcc_set_sysclk_source (line 287) | void rcc_set_sysclk_source(uint32_t clk)
function rcc_set_pll_source (line 296) | void rcc_set_pll_source(uint32_t pllsrc)
function rcc_set_ppre2 (line 305) | void rcc_set_ppre2(uint32_t ppre2)
function rcc_set_ppre1 (line 314) | void rcc_set_ppre1(uint32_t ppre1)
function rcc_set_hpre (line 323) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_rtcpre (line 332) | void rcc_set_rtcpre(uint32_t rtcpre)
function rcc_set_main_pll_hsi (line 341) | void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp,
function rcc_set_main_pll_hse (line 350) | void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp,
function rcc_system_clock_source (line 360) | uint32_t rcc_system_clock_source(void)
function rcc_clock_setup_hse_3v3 (line 366) | void rcc_clock_setup_hse_3v3(const clock_scale_t *clock)
function rcc_backupdomain_reset (line 408) | void rcc_backupdomain_reset(void)
FILE: firmware/libopencm3/lib/stm32/f3/adc.c
function adc_off (line 100) | void adc_off(uint32_t adc)
function adc_enable_analog_watchdog_regular (line 116) | void adc_enable_analog_watchdog_regular(uint32_t adc)
function adc_disable_analog_watchdog_regular (line 131) | void adc_disable_analog_watchdog_regular(uint32_t adc)
function adc_enable_analog_watchdog_injected (line 147) | void adc_enable_analog_watchdog_injected(uint32_t adc)
function adc_disable_analog_watchdog_injected (line 159) | void adc_disable_analog_watchdog_injected(uint32_t adc)
function adc_enable_discontinuous_mode_regular (line 180) | void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length)
function adc_disable_discontinuous_mode_regular (line 196) | void adc_disable_discontinuous_mode_regular(uint32_t adc)
function adc_enable_discontinuous_mode_injected (line 212) | void adc_enable_discontinuous_mode_injected(uint32_t adc)
function adc_disable_discontinuous_mode_injected (line 224) | void adc_disable_discontinuous_mode_injected(uint32_t adc)
function adc_enable_automatic_injected_group_conversion (line 240) | void adc_enable_automatic_injected_group_conversion(uint32_t adc)
function adc_disable_automatic_injected_group_conversion (line 253) | void adc_disable_automatic_injected_group_conversion(uint32_t adc)
function adc_enable_analog_watchdog_on_all_channels (line 275) | void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
function adc_enable_analog_watchdog_on_selected_channel (line 299) | void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc,
function adc_enable_eoc_interrupt_injected (line 352) | void adc_enable_eoc_interrupt_injected(uint32_t adc)
function adc_disable_eoc_interrupt_injected (line 364) | void adc_disable_eoc_interrupt_injected(uint32_t adc)
function adc_enable_all_awd_interrupt (line 376) | void adc_enable_all_awd_interrupt(uint32_t adc)
function adc_disable_all_awd_interrupt (line 390) | void adc_disable_all_awd_interrupt(uint32_t adc)
function adc_enable_eoc_interrupt (line 404) | void adc_enable_eoc_interrupt(uint32_t adc)
function adc_disable_eoc_interrupt (line 416) | void adc_disable_eoc_interrupt(uint32_t adc)
function adc_start_conversion_regular (line 431) | void adc_start_conversion_regular(uint32_t adc)
function adc_start_conversion_injected (line 450) | void adc_start_conversion_injected(uint32_t adc)
function adc_set_left_aligned (line 466) | void adc_set_left_aligned(uint32_t adc)
function adc_set_right_aligned (line 478) | void adc_set_right_aligned(uint32_t adc)
function adc_enable_dma (line 490) | void adc_enable_dma(uint32_t adc)
function adc_disable_dma (line 502) | void adc_disable_dma(uint32_t adc)
function adc_set_continuous_conversion_mode (line 518) | void adc_set_continuous_conversion_mode(uint32_t adc)
function adc_set_single_conversion_mode (line 533) | void adc_set_single_conversion_mode(uint32_t adc)
function adc_set_sample_time (line 551) | void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time)
function adc_set_sample_time_on_all_channels (line 580) | void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
function adc_set_watchdog_high_threshold (line 604) | void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold)
function adc_set_watchdog_low_threshold (line 623) | void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold)
function adc_set_regular_sequence (line 649) | void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t chan...
function adc_set_injected_sequence (line 695) | void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t cha...
function adc_eoc (line 725) | bool adc_eoc(uint32_t adc)
function adc_eoc_injected (line 741) | bool adc_eoc_injected(uint32_t adc)
function adc_read_regular (line 758) | uint32_t adc_read_regular(uint32_t adc)
function adc_read_injected (line 777) | uint32_t adc_read_injected(uint32_t adc, uint8_t reg)
function adc_set_injected_offset (line 805) | void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset)
function adc_power_on (line 838) | void adc_power_on(uint32_t adc)
function adc_set_clk_prescale (line 853) | void adc_set_clk_prescale(uint32_t prescale)
function adc_set_multi_mode (line 871) | void adc_set_multi_mode(uint32_t mode)
function adc_enable_external_trigger_regular (line 891) | void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger,
function adc_disable_external_trigger_regular (line 908) | void adc_disable_external_trigger_regular(uint32_t adc)
function adc_enable_external_trigger_injected (line 927) | void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger,
function adc_disable_external_trigger_injected (line 944) | void adc_disable_external_trigger_injected(uint32_t adc)
function adc_set_resolution (line 960) | void adc_set_resolution(uint32_t adc, uint16_t resolution)
function adc_enable_overrun_interrupt (line 980) | void adc_enable_overrun_interrupt(uint32_t adc)
function adc_disable_overrun_interrupt (line 992) | void adc_disable_overrun_interrupt(uint32_t adc)
function adc_get_overrun_flag (line 1009) | bool adc_get_overrun_flag(uint32_t adc)
function adc_clear_overrun_flag (line 1027) | void adc_clear_overrun_flag(uint32_t adc)
function adc_eoc_after_each (line 1043) | void adc_eoc_after_each(uint32_t adc)
function adc_eoc_after_group (line 1058) | void adc_eoc_after_group(uint32_t adc)
function adc_awd (line 1109) | bool adc_awd(uint32_t adc)
function adc_enable_temperature_sensor (line 1127) | void adc_enable_temperature_sensor()
function adc_disable_temperature_sensor (line 1142) | void adc_disable_temperature_sensor()
FILE: firmware/libopencm3/lib/stm32/f3/flash.c
function flash_clear_status_flags (line 35) | void flash_clear_status_flags(void)
FILE: firmware/libopencm3/lib/stm32/f3/gpio.c
function gpio_mode_setup (line 36) | void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down,
function gpio_set_output_options (line 65) | void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t s...
function gpio_set_af (line 90) | void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios)
function gpio_set (line 118) | void gpio_set(uint32_t gpioport, uint16_t gpios)
function gpio_clear (line 123) | void gpio_clear(uint32_t gpioport, uint16_t gpios)
function gpio_get (line 128) | uint16_t gpio_get(uint32_t gpioport, uint16_t gpios)
function gpio_toggle (line 133) | void gpio_toggle(uint32_t gpioport, uint16_t gpios)
function gpio_port_read (line 138) | uint16_t gpio_port_read(uint32_t gpioport)
function gpio_port_write (line 143) | void gpio_port_write(uint32_t gpioport, uint16_t data)
function gpio_port_config_lock (line 148) | void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios)
FILE: firmware/libopencm3/lib/stm32/f3/i2c.c
function i2c_reset (line 46) | void i2c_reset(uint32_t i2c)
function i2c_peripheral_enable (line 66) | void i2c_peripheral_enable(uint32_t i2c)
function i2c_peripheral_disable (line 81) | void i2c_peripheral_disable(uint32_t i2c)
function i2c_send_start (line 96) | void i2c_send_start(uint32_t i2c)
function i2c_send_stop (line 110) | void i2c_send_stop(uint32_t i2c)
function i2c_clear_stop (line 122) | void i2c_clear_stop(uint32_t i2c)
function i2c_set_own_7bit_slave_address (line 136) | void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave)
function i2c_set_own_10bit_slave_address (line 154) | void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave)
function i2c_send_data (line 166) | void i2c_send_data(uint32_t i2c, uint8_t data)
function i2c_get_data (line 176) | uint8_t i2c_get_data(uint32_t i2c)
function i2c_enable_analog_filter (line 181) | void i2c_enable_analog_filter(uint32_t i2c)
function i2c_disable_analog_filter (line 186) | void i2c_disable_analog_filter(uint32_t i2c)
function i2c_set_digital_filter (line 191) | void i2c_set_digital_filter(uint32_t i2c, uint8_t dnf_setting)
function i2c_set_prescaler (line 197) | void i2c_set_prescaler(uint32_t i2c, uint8_t presc)
function i2c_set_data_setup_time (line 203) | void i2c_set_data_setup_time(uint32_t i2c, uint8_t s_time)
function i2c_set_data_hold_time (line 209) | void i2c_set_data_hold_time(uint32_t i2c, uint8_t h_time)
function i2c_set_scl_high_period (line 215) | void i2c_set_scl_high_period(uint32_t i2c, uint8_t period)
function i2c_set_scl_low_period (line 221) | void i2c_set_scl_low_period(uint32_t i2c, uint8_t period)
function i2c_enable_stretching (line 227) | void i2c_enable_stretching(uint32_t i2c)
function i2c_disable_stretching (line 232) | void i2c_disable_stretching(uint32_t i2c)
function i2c_100khz_i2cclk8mhz (line 237) | void i2c_100khz_i2cclk8mhz(uint32_t i2c)
function i2c_set_7bit_addr_mode (line 246) | void i2c_set_7bit_addr_mode(uint32_t i2c)
function i2c_set_10bit_addr_mode (line 251) | void i2c_set_10bit_addr_mode(uint32_t i2c)
function i2c_set_7bit_address (line 256) | void i2c_set_7bit_address(uint32_t i2c, uint8_t addr)
function i2c_set_10bit_address (line 262) | void i2c_set_10bit_address(uint32_t i2c, uint16_t addr)
function i2c_set_write_transfer_dir (line 268) | void i2c_set_write_transfer_dir(uint32_t i2c)
function i2c_set_read_transfer_dir (line 273) | void i2c_set_read_transfer_dir(uint32_t i2c)
function i2c_set_bytes_to_transfer (line 278) | void i2c_set_bytes_to_transfer(uint32_t i2c, uint32_t n_bytes)
function i2c_is_start (line 284) | uint8_t i2c_is_start(uint32_t i2c)
function i2c_enable_autoend (line 293) | void i2c_enable_autoend(uint32_t i2c)
function i2c_disable_autoend (line 298) | void i2c_disable_autoend(uint32_t i2c)
function i2c_nack (line 303) | uint8_t i2c_nack(uint32_t i2c)
function i2c_busy (line 312) | uint8_t i2c_busy(uint32_t i2c)
function i2c_transmit_int_status (line 321) | uint8_t i2c_transmit_int_status(uint32_t i2c)
function i2c_transfer_complete (line 330) | uint8_t i2c_transfer_complete(uint32_t i2c)
function i2c_received_data (line 339) | uint8_t i2c_received_data(uint32_t i2c)
function i2c_enable_interrupt (line 355) | void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt)
function i2c_disable_interrupt (line 366) | void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt)
function i2c_enable_rxdma (line 376) | void i2c_enable_rxdma(uint32_t i2c)
function i2c_disable_rxdma (line 386) | void i2c_disable_rxdma(uint32_t i2c)
function i2c_enable_txdma (line 396) | void i2c_enable_txdma(uint32_t i2c)
function i2c_disable_txdma (line 406) | void i2c_disable_txdma(uint32_t i2c)
function write_i2c (line 411) | void write_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size,
function read_i2c (line 447) | void read_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size,
FILE: firmware/libopencm3/lib/stm32/f3/rcc.c
function rcc_osc_ready_int_clear (line 81) | void rcc_osc_ready_int_clear(enum osc osc)
function rcc_osc_ready_int_enable (line 102) | void rcc_osc_ready_int_enable(enum osc osc)
function rcc_osc_ready_int_disable (line 123) | void rcc_osc_ready_int_disable(enum osc osc)
function rcc_osc_ready_int_flag (line 144) | int rcc_osc_ready_int_flag(enum osc osc)
function rcc_css_int_clear (line 167) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 172) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 177) | void rcc_wait_for_osc_ready(enum osc osc)
function rcc_wait_for_osc_not_ready (line 199) | void rcc_wait_for_osc_not_ready(enum osc osc)
function rcc_wait_for_sysclk_status (line 220) | void rcc_wait_for_sysclk_status(enum osc osc)
function rcc_osc_on (line 238) | void rcc_osc_on(enum osc osc)
function rcc_osc_off (line 259) | void rcc_osc_off(enum osc osc)
function rcc_css_enable (line 280) | void rcc_css_enable(void)
function rcc_css_disable (line 285) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 290) | void rcc_osc_bypass_enable(enum osc osc)
function rcc_osc_bypass_disable (line 307) | void rcc_osc_bypass_disable(enum osc osc)
function rcc_peripheral_enable_clock (line 324) | void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_disable_clock (line 329) | void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_reset (line 334) | void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
function rcc_peripheral_clear_reset (line 339) | void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_r...
function rcc_set_sysclk_source (line 344) | void rcc_set_sysclk_source(uint32_t clk)
function rcc_set_pll_source (line 353) | void rcc_set_pll_source(uint32_t pllsrc)
function rcc_set_ppre2 (line 362) | void rcc_set_ppre2(uint32_t ppre2)
function rcc_set_ppre1 (line 371) | void rcc_set_ppre1(uint32_t ppre1)
function rcc_set_hpre (line 380) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_main_pll_hsi (line 390) | void rcc_set_main_pll_hsi(uint32_t pll)
function rcc_get_system_clock_source (line 397) | uint32_t rcc_get_system_clock_source(void)
function rcc_clock_setup_hsi (line 404) | void rcc_clock_setup_hsi(const clock_scale_t *clock)
function rcc_backupdomain_reset (line 440) | void rcc_backupdomain_reset(void)
function rcc_set_i2c_clock_hsi (line 449) | void rcc_set_i2c_clock_hsi(uint32_t i2c)
function rcc_set_i2c_clock_sysclk (line 459) | void rcc_set_i2c_clock_sysclk(uint32_t i2c)
function rcc_get_i2c_clocks (line 469) | uint32_t rcc_get_i2c_clocks(void)
function rcc_usb_prescale_1_5 (line 474) | void rcc_usb_prescale_1_5(void)
function rcc_usb_prescale_1 (line 479) | void rcc_usb_prescale_1(void)
FILE: firmware/libopencm3/lib/stm32/f3/spi.c
function spi_send8 (line 35) | void spi_send8(uint32_t spi, uint8_t data)
function spi_read8 (line 44) | uint8_t spi_read8(uint32_t spi)
function spi_set_data_size (line 53) | void spi_set_data_size(uint32_t spi, uint16_t data_s)
function spi_fifo_reception_threshold_8bit (line 59) | void spi_fifo_reception_threshold_8bit(uint32_t spi)
function spi_fifo_reception_threshold_16bit (line 64) | void spi_fifo_reception_threshold_16bit(uint32_t spi)
function spi_i2s_mode_spi_mode (line 69) | void spi_i2s_mode_spi_mode(uint32_t spi)
FILE: firmware/libopencm3/lib/stm32/f3/usart.c
function usart_send (line 42) | void usart_send(uint32_t usart, uint16_t data)
function usart_recv (line 59) | uint16_t usart_recv(uint32_t usart)
function usart_wait_send_ready (line 75) | void usart_wait_send_ready(uint32_t usart)
function usart_wait_recv_ready (line 90) | void usart_wait_recv_ready(uint32_t usart)
function usart_get_flag (line 105) | bool usart_get_flag(uint32_t usart, uint32_t flag)
function usart_get_interrupt_source (line 127) | bool usart_get_interrupt_source(uint32_t usart, uint32_t flag)
FILE: firmware/libopencm3/lib/stm32/f3/vector_chipset.c
function pre_main (line 23) | static void pre_main(void)
FILE: firmware/libopencm3/lib/stm32/f4/adc.c
function adc_off (line 97) | void adc_off(uint32_t adc)
function adc_enable_analog_watchdog_regular (line 112) | void adc_enable_analog_watchdog_regular(uint32_t adc)
function adc_disable_analog_watchdog_regular (line 123) | void adc_disable_analog_watchdog_regular(uint32_t adc)
function adc_enable_analog_watchdog_injected (line 138) | void adc_enable_analog_watchdog_injected(uint32_t adc)
function adc_disable_analog_watchdog_injected (line 149) | void adc_disable_analog_watchdog_injected(uint32_t adc)
function adc_enable_discontinuous_mode_regular (line 170) | void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length)
function adc_disable_discontinuous_mode_regular (line 185) | void adc_disable_discontinuous_mode_regular(uint32_t adc)
function adc_enable_discontinuous_mode_injected (line 200) | void adc_enable_discontinuous_mode_injected(uint32_t adc)
function adc_disable_discontinuous_mode_injected (line 211) | void adc_disable_discontinuous_mode_injected(uint32_t adc)
function adc_enable_automatic_injected_group_conversion (line 226) | void adc_enable_automatic_injected_group_conversion(uint32_t adc)
function adc_disable_automatic_injected_group_conversion (line 238) | void adc_disable_automatic_injected_group_conversion(uint32_t adc)
function adc_enable_analog_watchdog_on_all_channels (line 259) | void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
function adc_enable_analog_watchdog_on_selected_channel (line 281) | void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc,
function adc_enable_scan_mode (line 304) | void adc_enable_scan_mode(uint32_t adc)
function adc_disable_scan_mode (line 315) | void adc_disable_scan_mode(uint32_t adc)
function adc_enable_eoc_interrupt_injected (line 326) | void adc_enable_eoc_interrupt_injected(uint32_t adc)
function adc_disable_eoc_interrupt_injected (line 337) | void adc_disable_eoc_interrupt_injected(uint32_t adc)
function adc_enable_awd_interrupt (line 348) | void adc_enable_awd_interrupt(uint32_t adc)
function adc_disable_awd_interrupt (line 359) | void adc_disable_awd_interrupt(uint32_t adc)
function adc_enable_eoc_interrupt (line 370) | void adc_enable_eoc_interrupt(uint32_t adc)
function adc_disable_eoc_interrupt (line 381) | void adc_disable_eoc_interrupt(uint32_t adc)
function adc_start_conversion_regular (line 395) | void adc_start_conversion_regular(uint32_t adc)
function adc_start_conversion_injected (line 413) | void adc_start_conversion_injected(uint32_t adc)
function adc_set_left_aligned (line 428) | void adc_set_left_aligned(uint32_t adc)
function adc_set_right_aligned (line 439) | void adc_set_right_aligned(uint32_t adc)
function adc_enable_dma (line 450) | void adc_enable_dma(uint32_t adc)
function adc_disable_dma (line 461) | void adc_disable_dma(uint32_t adc)
function adc_set_continuous_conversion_mode (line 475) | void adc_set_continuous_conversion_mode(uint32_t adc)
function adc_set_single_conversion_mode (line 489) | void adc_set_single_conversion_mode(uint32_t adc)
function adc_set_sample_time (line 505) | void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time)
function adc_set_sample_time_on_all_channels (line 532) | void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
function adc_set_watchdog_high_threshold (line 555) | void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold)
function adc_set_watchdog_low_threshold (line 571) | void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold)
function adc_set_regular_sequence (line 592) | void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t chan...
function adc_set_injected_sequence (line 632) | void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t cha...
function adc_eoc (line 661) | bool adc_eoc(uint32_t adc)
function adc_eoc_injected (line 675) | bool adc_eoc_injected(uint32_t adc)
function adc_read_regular (line 691) | uint32_t adc_read_regular(uint32_t adc)
function adc_read_injected (line 709) | uint32_t adc_read_injected(uint32_t adc, uint8_t reg)
function adc_set_injected_offset (line 736) | void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset)
function adc_power_on (line 764) | void adc_power_on(uint32_t adc)
function adc_set_clk_prescale (line 778) | void adc_set_clk_prescale(uint32_t prescale)
function adc_set_multi_mode (line 795) | void adc_set_multi_mode(uint32_t mode)
function adc_enable_external_trigger_regular (line 813) | void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger,
function adc_disable_external_trigger_regular (line 829) | void adc_disable_external_trigger_regular(uint32_t adc)
function adc_enable_external_trigger_injected (line 846) | void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger,
function adc_disable_external_trigger_injected (line 862) | void adc_disable_external_trigger_injected(uint32_t adc)
function adc_set_resolution (line 877) | void adc_set_resolution(uint32_t adc, uint32_t resolution)
function adc_enable_overrun_interrupt (line 896) | void adc_enable_overrun_interrupt(uint32_t adc)
function adc_disable_overrun_interrupt (line 907) | void adc_disable_overrun_interrupt(uint32_t adc)
function adc_get_overrun_flag (line 923) | bool adc_get_overrun_flag(uint32_t adc)
function adc_clear_overrun_flag (line 939) | void adc_clear_overrun_flag(uint32_t adc)
function adc_eoc_after_each (line 954) | void adc_eoc_after_each(uint32_t adc)
function adc_eoc_after_group (line 968) | void adc_eoc_after_group(uint32_t adc)
function adc_set_dma_continue (line 982) | void adc_set_dma_continue(uint32_t adc)
function adc_set_dma_terminate (line 996) | void adc_set_dma_terminate(uint32_t adc)
function adc_awd (line 1009) | bool adc_awd(uint32_t adc)
function adc_enable_temperature_sensor (line 1023) | void adc_enable_temperature_sensor()
function adc_disable_temperature_sensor (line 1037) | void adc_disable_temperature_sensor()
FILE: firmware/libopencm3/lib/stm32/f4/crypto.c
function crypto_set_mac_algorithm (line 39) | void crypto_set_mac_algorithm(enum crypto_mode_mac mode)
function crypto_context_swap (line 49) | void crypto_context_swap(uint32_t *buf)
FILE: firmware/libopencm3/lib/stm32/f4/pwr.c
function pwr_set_vos_scale (line 39) | void pwr_set_vos_scale(vos_scale_t scale)
FILE: firmware/libopencm3/lib/stm32/f4/rcc.c
function rcc_osc_ready_int_clear (line 163) | void rcc_osc_ready_int_clear(osc_t osc)
function rcc_osc_ready_int_enable (line 184) | void rcc_osc_ready_int_enable(osc_t osc)
function rcc_osc_ready_int_disable (line 205) | void rcc_osc_ready_int_disable(osc_t osc)
function rcc_osc_ready_int_flag (line 226) | int rcc_osc_ready_int_flag(osc_t osc)
function rcc_css_int_clear (line 249) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 254) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 259) | void rcc_wait_for_osc_ready(osc_t osc)
function rcc_wait_for_sysclk_status (line 280) | void rcc_wait_for_sysclk_status(osc_t osc)
function rcc_osc_on (line 298) | void rcc_osc_on(osc_t osc)
function rcc_osc_off (line 319) | void rcc_osc_off(osc_t osc)
function rcc_css_enable (line 340) | void rcc_css_enable(void)
function rcc_css_disable (line 345) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 350) | void rcc_osc_bypass_enable(osc_t osc)
function rcc_osc_bypass_disable (line 367) | void rcc_osc_bypass_disable(osc_t osc)
function rcc_peripheral_enable_clock (line 384) | void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_disable_clock (line 389) | void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_reset (line 394) | void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
function rcc_peripheral_clear_reset (line 399) | void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_r...
function rcc_set_sysclk_source (line 404) | void rcc_set_sysclk_source(uint32_t clk)
function rcc_set_pll_source (line 413) | void rcc_set_pll_source(uint32_t pllsrc)
function rcc_set_ppre2 (line 422) | void rcc_set_ppre2(uint32_t ppre2)
function rcc_set_ppre1 (line 431) | void rcc_set_ppre1(uint32_t ppre1)
function rcc_set_hpre (line 440) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_rtcpre (line 449) | void rcc_set_rtcpre(uint32_t rtcpre)
function rcc_set_main_pll_hsi (line 458) | void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp,
function rcc_set_main_pll_hse (line 467) | void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp,
function rcc_system_clock_source (line 477) | uint32_t rcc_system_clock_source(void)
function rcc_clock_setup_hse_3v3 (line 483) | void rcc_clock_setup_hse_3v3(const clock_scale_t *clock)
function rcc_backupdomain_reset (line 535) | void rcc_backupdomain_reset(void)
FILE: firmware/libopencm3/lib/stm32/f4/rtc.c
function rtc_enable_wakeup_timer (line 42) | void rtc_enable_wakeup_timer(void)
function rtc_disable_wakeup_timer (line 53) | void rtc_disable_wakeup_timer(void)
function rtc_enable_wakeup_timer_interrupt (line 64) | void rtc_enable_wakeup_timer_interrupt(void)
function rtc_disable_wakeup_timer_interrupt (line 88) | void rtc_disable_wakeup_timer_interrupt(void)
FILE: firmware/libopencm3/lib/stm32/f4/vector_chipset.c
function pre_main (line 23) | static void pre_main(void)
FILE: firmware/libopencm3/lib/stm32/l1/flash.c
function flash_64bit_enable (line 24) | void flash_64bit_enable(void)
function flash_64bit_disable (line 29) | void flash_64bit_disable(void)
function flash_prefetch_enable (line 34) | void flash_prefetch_enable(void)
function flash_prefetch_disable (line 39) | void flash_prefetch_disable(void)
function flash_set_ws (line 44) | void flash_set_ws(uint32_t ws)
FILE: firmware/libopencm3/lib/stm32/l1/pwr.c
function pwr_set_vos_scale (line 40) | void pwr_set_vos_scale(vos_scale_t scale)
FILE: firmware/libopencm3/lib/stm32/l1/rcc.c
function rcc_osc_ready_int_clear (line 97) | void rcc_osc_ready_int_clear(osc_t osc)
function rcc_osc_ready_int_enable (line 121) | void rcc_osc_ready_int_enable(osc_t osc)
function rcc_osc_ready_int_disable (line 145) | void rcc_osc_ready_int_disable(osc_t osc)
function rcc_osc_ready_int_flag (line 169) | int rcc_osc_ready_int_flag(osc_t osc)
function rcc_css_int_clear (line 196) | void rcc_css_int_clear(void)
function rcc_css_int_flag (line 201) | int rcc_css_int_flag(void)
function rcc_wait_for_osc_ready (line 206) | void rcc_wait_for_osc_ready(osc_t osc)
function rcc_wait_for_sysclk_status (line 230) | void rcc_wait_for_sysclk_status(osc_t osc)
function rcc_osc_on (line 255) | void rcc_osc_on(osc_t osc)
function rcc_osc_off (line 279) | void rcc_osc_off(osc_t osc)
function rcc_css_enable (line 303) | void rcc_css_enable(void)
function rcc_css_disable (line 308) | void rcc_css_disable(void)
function rcc_osc_bypass_enable (line 313) | void rcc_osc_bypass_enable(osc_t osc)
function rcc_osc_bypass_disable (line 331) | void rcc_osc_bypass_disable(osc_t osc)
function rcc_peripheral_enable_clock (line 349) | void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_disable_clock (line 354) | void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en)
function rcc_peripheral_reset (line 359) | void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
function rcc_peripheral_clear_reset (line 364) | void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_r...
function rcc_set_sysclk_source (line 369) | void rcc_set_sysclk_source(uint32_t clk)
function rcc_set_pll_configuration (line 378) | void rcc_set_pll_configuration(uint32_t source, uint32_t multiplier,
function rcc_set_pll_source (line 393) | void rcc_set_pll_source(uint32_t pllsrc)
function rcc_set_ppre2 (line 402) | void rcc_set_ppre2(uint32_t ppre2)
function rcc_set_ppre1 (line 411) | void rcc_set_ppre1(uint32_t ppre1)
function rcc_set_hpre (line 420) | void rcc_set_hpre(uint32_t hpre)
function rcc_set_rtcpre (line 429) | void rcc_set_rtcpre(uint32_t rtcpre)
function rcc_system_clock_source (line 438) | uint32_t rcc_system_clock_source(void)
function rcc_rtc_select_clock (line 444) | void rcc_rtc_select_clock(uint32_t clock)
function rcc_clock_setup_msi (line 450) | void rcc_clock_setup_msi(const clock_scale_t *clock)
function rcc_clock_setup_hsi (line 487) | void rcc_clock_setup_hsi(const clock_scale_t *clock)
function rcc_clock_setup_pll (line 518) | void rcc_clock_setup_pll(const clock_scale_t *clock)
FILE: firmware/libopencm3/lib/stm32/l1/timer.c
function timer_set_option (line 48) | void timer_set_option(uint32_t timer_peripheral, uint32_t option)
FILE: firmware/libopencm3/lib/usb/usb.c
function usbd_device (line 64) | usbd_device *usbd_init(const usbd_driver *driver,
function usbd_register_reset_callback (line 92) | void usbd_register_reset_callback(usbd_device *usbd_dev, void (*callback...
function usbd_register_suspend_callback (line 97) | void usbd_register_suspend_callback(usbd_device *usbd_dev,
function usbd_register_resume_callback (line 103) | void usbd_register_resume_callback(usbd_device *usbd_dev,
function usbd_register_sof_callback (line 109) | void usbd_register_sof_callback(usbd_device *usbd_dev, void (*callback)(...
function _usbd_reset (line 114) | void _usbd_reset(usbd_device *usbd_dev)
function usbd_poll (line 127) | void usbd_poll(usbd_device *usbd_dev)
function usbd_disconnect (line 132) | void usbd_disconnect(usbd_device *usbd_dev, bool disconnected)
function usbd_ep_setup (line 140) | void usbd_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type,
function usbd_ep_write_packet (line 147) | uint16_t usbd_ep_write_packet(usbd_device *usbd_dev, uint8_t addr,
function usbd_ep_read_packet (line 153) | uint16_t usbd_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *...
function usbd_ep_stall_set (line 159) | void usbd_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall)
function usbd_ep_stall_get (line 164) | uint8_t usbd_ep_stall_get(usbd_device *usbd_dev, uint8_t addr)
function usbd_ep_nak_set (line 169) | void usbd_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak)
FILE: firmware/libopencm3/lib/usb/usb_control.c
function stall_transaction (line 47) | static void stall_transaction(usbd_device *usbd_dev)
function usbd_register_control_callback (line 54) | int usbd_register_control_callback(usbd_device *usbd_dev, uint8_t type,
function usb_control_send_chunk (line 74) | static void usb_control_send_chunk(usbd_device *usbd_dev)
function usb_control_recv_chunk (line 98) | static int usb_control_recv_chunk(usbd_device *usbd_dev)
function usb_control_request_dispatch (line 118) | static int usb_control_request_dispatch(usbd_device *usbd_dev,
function usb_control_setup_read (line 149) | static void usb_control_setup_read(usbd_device *usbd_dev,
function usb_control_setup_write (line 170) | static void usb_control_setup_write(usbd_device *usbd_dev,
function _usbd_control_setup (line 192) | void _usbd_control_setup(usbd_device *usbd_dev, uint8_t ea)
function _usbd_control_out (line 213) | void _usbd_control_out(usbd_device *usbd_dev, uint8_t ea)
function _usbd_control_in (line 259) | void _usbd_control_in(usbd_device *usbd_dev, uint8_t ea)
FILE: firmware/libopencm3/lib/usb/usb_f103.c
type _usbd_device (line 46) | struct _usbd_device
type _usbd_driver (line 48) | struct _usbd_driver
function usbd_device (line 62) | static usbd_device *stm32f103_usbd_init(void)
function stm32f103_set_address (line 75) | static void stm32f103_set_address(usbd_device *dev, uint8_t addr)
function usb_set_ep_rx_bufsize (line 88) | static void usb_set_ep_rx_bufsize(usbd_device *dev, uint8_t ep, uint32_t...
function stm32f103_ep_setup (line 104) | static void stm32f103_ep_setup(usbd_device *dev, uint8_t addr, uint8_t t...
function stm32f103_endpoints_reset (line 147) | static void stm32f103_endpoints_reset(usbd_device *dev)
function stm32f103_ep_stall_set (line 159) | static void stm32f103_ep_stall_set(usbd_device *dev, uint8_t addr,
function stm32f103_ep_stall_get (line 189) | static uint8_t stm32f103_ep_stall_get(usbd_device *dev, uint8_t addr)
function stm32f103_ep_nak_set (line 206) | static void stm32f103_ep_nak_set(usbd_device *dev, uint8_t addr, uint8_t...
function usb_copy_to_pm (line 230) | static void usb_copy_to_pm(volatile void *vPM, const void *buf, uint16_t...
function stm32f103_ep_write_packet (line 240) | static uint16_t stm32f103_ep_write_packet(usbd_device *dev, uint8_t addr,
function usb_copy_from_pm (line 264) | static void usb_copy_from_pm(void *buf, const volatile void *vPM, uint16...
function stm32f103_ep_read_packet (line 279) | static uint16_t stm32f103_ep_read_packet(usbd_device *dev, uint8_t addr,
function stm32f103_poll (line 298) | static void stm32f103_poll(usbd_device *dev)
FILE: firmware/libopencm3/lib/usb/usb_f107.c
type _usbd_device (line 33) | struct _usbd_device
type _usbd_driver (line 35) | struct _usbd_driver
function usbd_device (line 53) | static usbd_device *stm32f107_usbd_init(void)
FILE: firmware/libopencm3/lib/usb/usb_f207.c
type _usbd_device (line 33) | struct _usbd_device
type _usbd_driver (line 35) | struct _usbd_driver
function usbd_device (line 53) | static usbd_device *stm32f207_usbd_init(void)
FILE: firmware/libopencm3/lib/usb/usb_fx07_common.c
function stm32fx07_set_address (line 36) | void stm32fx07_set_address(usbd_device *usbd_dev, uint8_t addr)
function stm32fx07_ep_setup (line 41) | void stm32fx07_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type,
function stm32fx07_endpoints_reset (line 118) | void stm32fx07_endpoints_reset(usbd_device *usbd_dev)
function stm32fx07_ep_stall_set (line 124) | void stm32fx07_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t...
function stm32fx07_ep_stall_get (line 153) | uint8_t stm32fx07_ep_stall_get(usbd_device *usbd_dev, uint8_t addr)
function stm32fx07_ep_nak_set (line 165) | void stm32fx07_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak)
function stm32fx07_ep_write_packet (line 181) | uint16_t stm32fx07_ep_write_packet(usbd_device *usbd_dev, uint8_t addr,
function stm32fx07_ep_read_packet (line 208) | uint16_t stm32fx07_ep_read_packet(usbd_device *usbd_dev, uint8_t addr,
function stm32fx07_poll (line 236) | void stm32fx07_poll(usbd_device *usbd_dev)
function stm32fx07_disconnect (line 331) | void stm32fx07_disconnect(usbd_device *usbd_dev, bool disconnected)
FILE: firmware/libopencm3/lib/usb/usb_private.h
type _usbd_device (line 46) | struct _usbd_device {
type _usbd_transaction (line 111) | enum _usbd_transaction {
type usb_setup_data (line 125) | struct usb_setup_data
type usb_setup_data (line 128) | struct usb_setup_data
type usb_setup_data (line 131) | struct usb_setup_data
type usb_setup_data (line 133) | struct usb_setup_data
type _usbd_driver (line 139) | struct _usbd_driver {
FILE: firmware/libopencm3/lib/usb/usb_standard.c
function usbd_register_set_config_callback (line 42) | void usbd_register_set_config_callback(usbd_device *usbd_dev,
function build_config_descriptor (line 49) | static uint16_t build_config_descriptor(usbd_device *usbd_dev,
function usb_descriptor_type (line 111) | static int usb_descriptor_type(uint16_t wValue)
function usb_descriptor_index (line 116) | static int usb_descriptor_index(uint16_t wValue)
function usb_standard_get_descriptor (line 121) | static int usb_standard_get_descriptor(usbd_device *usbd_dev,
function usb_standard_set_address (line 192) | static int usb_standard_set_address(usbd_device *usbd_dev,
function usb_standard_set_configuration (line 218) | static int usb_standard_set_configuration(usbd_device *usbd_dev,
function usb_standard_get_configuration (line 253) | static int usb_standard_get_configuration(usbd_device *usbd_dev,
function usb_standard_set_interface (line 267) | static int usb_standard_set_interface(usbd_device *usbd_dev,
function usb_standard_get_interface (line 284) | static int usb_standard_get_interface(usbd_device *usbd_dev,
function usb_standard_device_get_status (line 299) | static int usb_standard_device_get_status(usbd_device *usbd_dev,
function usb_standard_interface_get_status (line 317) | static int usb_standard_interface_get_status(usbd_device *usbd_dev,
function usb_standard_endpoint_get_status (line 334) | static int usb_standard_endpoint_get_status(usbd_device *usbd_dev,
function usb_standard_endpoint_stall (line 349) | static int usb_standard_endpoint_stall(usbd_device *usbd_dev,
function usb_standard_endpoint_unstall (line 361) | static int usb_standard_endpoint_unstall(usbd_device *usbd_dev,
function _usbd_standard_request_device (line 376) | int _usbd_standard_request_device(usbd_device *usbd_dev,
function _usbd_standard_request_interface (line 430) | int _usbd_standard_request_interface(usbd_device *usbd_dev,
function _usbd_standard_request_endpoint (line 460) | int _usbd_standard_request_endpoint(usbd_device *usbd_dev,
function _usbd_standard_request (line 497) | int _usbd_standard_request(usbd_device *usbd_dev, struct usb_setup_data ...
FILE: firmware/libopencm3/scripts/data/lpc43xx/csv2yaml.py
function convert_file (line 9) | def convert_file(fname):
FILE: firmware/libopencm3/scripts/data/lpc43xx/yaml_odict.py
function construct_odict (line 3) | def construct_odict(load, node):
function repr_pairs (line 48) | def repr_pairs(dump, tag, sequence, flow_style=None):
function repr_odict (line 70) | def repr_odict(dumper, data):
FILE: host/hackrf-tools/getopt/getopt.c
function exchange (line 302) | static void
function getopt_long (line 453) | int
function getopt_long_only (line 469) | int
function _getopt_internal (line 536) | int
function getopt (line 1002) | int
function main (line 1021) | int
FILE: host/hackrf-tools/getopt/getopt.h
type option (line 94) | struct option
type option (line 152) | struct option
type option (line 155) | struct option
type option (line 160) | struct option
FILE: host/hackrf-tools/src/hackrf_info.c
function main (line 29) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_spiflash.c
type option (line 49) | struct option
function parse_u32 (line 58) | int parse_u32(char* s, uint32_t* const value)
function usage (line 86) | static void usage()
function main (line 97) | int main(int argc, char** argv)
FILE: host/hackrf-tools/src/hackrf_transfer.c
function gettimeofday (line 57) | int gettimeofday(struct timeval *tv, void* ignored)
function buf_add (line 101) | static int buf_add(const uint8_t *s, int l) {
function buf_size (line 128) | static int buf_size(void) {
function buf_get (line 136) | static int buf_get(uint8_t *dest, int max_bytes) {
function buf_init (line 156) | static int buf_init(void)
function TimevalDiff (line 180) | static float
function parse_u64 (line 186) | int parse_u64(char* s, uint64_t* const value) {
function parse_u32 (line 213) | int parse_u32(char* s, uint32_t* const value) {
type timeval (line 248) | struct timeval
type timeval (line 249) | struct timeval
function write_header (line 254) | static void write_header(FILE *fd, double sample_rate, double f0, double...
function rx_callback (line 301) | int rx_callback(hackrf_transfer* transfer) {
function usage (line 336) | static void usage() {
function BOOL (line 350) | BOOL WINAPI
function sigint_callback_handler (line 361) | void sigint_callback_handler(int signum)
function main (line 371) | int main(int argc, char** argv) {
FILE: host/libhackrf/src/hackrf.c
type hackrf_vendor_request (line 58) | typedef enum {
type hackrf_usb_configurations (line 74) | typedef enum {
type hackrf_transceiver_mode (line 79) | typedef enum {
type hackrf_device (line 85) | struct hackrf_device {
type max2837_ft_t (line 98) | typedef struct {
type adf_reg (line 122) | typedef struct {
function request_exit (line 200) | static void request_exit(void)
function cancel_transfers (line 205) | static int cancel_transfers(hackrf_device* device)
function free_transfers (line 224) | static int free_transfers(hackrf_device* device)
function allocate_transfers (line 245) | static int allocate_transfers(hackrf_device* const device)
function prepare_transfers (line 286) | static int prepare_transfers(
function detach_kernel_drivers (line 313) | static int detach_kernel_drivers(libusb_device_handle* usb_device_handle)
function set_hackrf_configuration (line 348) | static int set_hackrf_configuration(libusb_device_handle* usb_device, in...
function hackrf_init (line 384) | int ADDCALL hackrf_init(void)
function hackrf_exit (line 399) | int ADDCALL hackrf_exit(void)
type hackrf_usb_board_id (line 424) | enum hackrf_usb_board_id
type libusb_device_descriptor (line 433) | struct libusb_device_descriptor
function hackrf_device_list_free (line 467) | void ADDCALL hackrf_device_list_free(hackrf_device_list_t *list)
function libusb_device_handle (line 484) | libusb_device_handle* hackrf_open_usb(const char* const desired_serial_n...
function hackrf_open_setup (line 553) | static int hackrf_open_setup(libusb_device_handle* usb_device, hackrf_de...
function hackrf_open (line 611) | int ADDCALL hackrf_open(hackrf_device** device)
function hackrf_open_by_serial (line 640) | int ADDCALL hackrf_open_by_serial(const char* const desired_serial_numbe...
function hackrf_device_list_open (line 664) | int ADDCALL hackrf_device_list_open(hackrf_device_list_t *list, int idx,...
function hackrf_set_transceiver_mode (line 683) | int ADDCALL hackrf_set_transceiver_mode(hackrf_device* device, hackrf_tr...
function hackrf_set_sweep (line 705) | int ADDCALL hackrf_set_sweep(hackrf_device* device, double fstart, doubl...
function hackrf_set_adf4158_reg (line 779) | int ADDCALL hackrf_set_adf4158_reg(char *name, unsigned int value) {
function hackrf_adf4158_reg_to_device (line 795) | static int hackrf_adf4158_reg_to_device(hackrf_device* device, unsigned ...
function hackrf_adf4158_to_device (line 814) | int ADDCALL hackrf_adf4158_to_device(hackrf_device* device)
function hackrf_set_gpio (line 858) | int ADDCALL hackrf_set_gpio(hackrf_device *device, uint32_t bits) {
function hackrf_clear_gpio (line 872) | int ADDCALL hackrf_clear_gpio(hackrf_device *device, uint32_t bits) {
function hackrf_set_clock_divider (line 888) | int ADDCALL hackrf_set_clock_divider(hackrf_device *device, uint16_t div...
function hackrf_spiflash_erase (line 902) | int ADDCALL hackrf_spiflash_erase(hackrf_device* device)
function hackrf_spiflash_write (line 924) | int ADDCALL hackrf_spiflash_write(hackrf_device* device, const uint32_t ...
function hackrf_spiflash_read (line 953) | int ADDCALL hackrf_spiflash_read(hackrf_device* device, const uint32_t a...
function hackrf_board_id_read (line 982) | int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value)
function hackrf_version_string_read (line 1004) | int ADDCALL hackrf_version_string_read(hackrf_device* device, char* vers...
function hackrf_board_partid_serialno_read (line 1028) | int ADDCALL hackrf_board_partid_serialno_read(hackrf_device* device, rea...
function hackrf_set_mcp (line 1061) | int ADDCALL hackrf_set_mcp(hackrf_device* device, uint32_t value)
type timeval (line 1093) | struct timeval
function hackrf_libusb_transfer_callback (line 1107) | static void hackrf_libusb_transfer_callback(struct libusb_transfer* usb_...
function kill_transfer_thread (line 1143) | static int kill_transfer_thread(hackrf_device* device)
function create_transfer_thread (line 1167) | static int create_transfer_thread(hackrf_device* device,
function hackrf_is_streaming (line 1203) | int ADDCALL hackrf_is_streaming(hackrf_device* device)
function hackrf_start_rx (line 1228) | int ADDCALL hackrf_start_rx(hackrf_device* device, hackrf_sample_block_c...
function hackrf_stop_rx (line 1246) | int ADDCALL hackrf_stop_rx(hackrf_device* device)
function hackrf_close (line 1258) | int ADDCALL hackrf_close(hackrf_device* device)
type hackrf_error (line 1282) | enum hackrf_error
type hackrf_board_id (line 1327) | enum hackrf_board_id
function ADDAPI (line 1348) | extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(enum hackrf_u...
type rf_path_filter (line 1366) | enum rf_path_filter
FILE: host/libhackrf/src/hackrf.h
type hackrf_error (line 50) | enum hackrf_error {
type hackrf_board_id (line 65) | enum hackrf_board_id {
type hackrf_usb_board_id (line 72) | enum hackrf_usb_board_id {
type rf_path_filter (line 79) | enum rf_path_filter {
type transceiver_mode_t (line 85) | typedef enum {
type hackrf_device (line 93) | typedef struct hackrf_device hackrf_device;
type hackrf_transfer (line 95) | typedef struct {
type read_partid_serialno_t (line 104) | typedef struct {
type hackrf_device_list (line 110) | struct hackrf_device_list {
type hackrf_device_list_t (line 119) | typedef struct hackrf_device_list hackrf_device_list_t;
type hackrf_error (line 154) | enum hackrf_error
type hackrf_board_id (line 155) | enum hackrf_board_id
type hackrf_usb_board_id (line 156) | enum hackrf_usb_board_id
type rf_path_filter (line 157) | enum rf_path_filter
FILE: processing/analysis.py
function most_common (line 60) | def most_common(lst):
function moving_average (line 100) | def moving_average(a, n=10) :
FILE: processing/bicycle_sar.py
function read_bb_filter (line 29) | def read_bb_filter(filename):
function most_common (line 71) | def most_common(lst):
FILE: processing/filter.py
function conv (line 9) | def conv(taps, signal):
FILE: processing/fir/fir.c
function array_to_32 (line 16) | uint32_t array_to_32(int8_t *arr) {
function gcd (line 20) | int gcd(int m, int n)
function lcm (line 31) | int lcm(int m, int n)
function conv (line 36) | int conv(const float *taps, int ntaps, const int16_t *signal, int len_si...
function main (line 49) | int main(int argc, char *argv[]) {
FILE: processing/sar_autofocus.py
function entropy (line 21) | def entropy(im):
function ift (line 28) | def ift(F, ax = -1):
function ft (line 33) | def ft(F, ax = -1):
function ift2 (line 38) | def ift2(F, delta=1):
function taylor (line 44) | def taylor(nsamples, S_L=43):
function hilbert (line 73) | def hilbert(x):
function sar_entropy (line 93) | def sar_entropy(data, fc, bw, tsweep, delta_crange, errors, window=True):
function surrogate (line 162) | def surrogate(x, w, a, p, c):
function surrogate_min (line 165) | def surrogate_min(raw_data, fc, bw, tsweep, delta_crange, iterations=20):
FILE: processing/sar_process.py
function unwrap (line 19) | def unwrap(a, fc):
function entropy (line 32) | def entropy(im):
function ift (line 39) | def ift(F, ax = -1):
function ft (line 44) | def ft(F, ax = -1):
function ift2 (line 49) | def ift2(F, delta=1):
function taylor (line 55) | def taylor(nsamples, S_L=43):
function hilbert (line 84) | def hilbert(x):
FILE: processing/sync_analysis.py
function most_common (line 8) | def most_common(lst):
Condensed preview — 728 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,835K chars).
[
{
"path": ".gitignore",
"chars": 12,
"preview": "*.swp\n*.pyc\n"
},
{
"path": "README.md",
"chars": 908,
"preview": "\nFMCW radar hardware, firmware and processing software.\n\nFolders:\n\nhardware: KiCad hardware design files.\n\n- fmcw2: RF b"
},
{
"path": "firmware/CMakeLists.txt",
"chars": 1074,
"preview": "# Copyright 2012 Jared Boone <jared@sharebrained.com>\n#\n# This file is part of HackRF.\n#\n# This program is free software"
},
{
"path": "firmware/COPYING",
"chars": 17962,
"preview": "\t\t GNU GENERAL PUBLIC LICENSE\n\t\t Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc."
},
{
"path": "firmware/blinky/CMakeLists.txt",
"chars": 1034,
"preview": "# Copyright 2012 Michael Ossmann <mike@ossmann.com>\n# Copyright 2012 Jared Boone <jared@sharebrained.com>\n#\n# This file "
},
{
"path": "firmware/blinky/blinky.c",
"chars": 1465,
"preview": "/*\n * Copyright 2010 - 2012 Michael Ossmann\n *\n * This file is part of HackRF.\n *\n * This program is free software; you "
},
{
"path": "firmware/cmake_install.cmake",
"chars": 1323,
"preview": "# Install script for directory: /home/henrik/koodi/fmcw2/firmware/blinky\n\n# Set the install prefix\nif(NOT DEFINED CMAKE_"
},
{
"path": "firmware/common/LPC4320_M4_memory.ld",
"chars": 1269,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * Thi"
},
{
"path": "firmware/common/LPC4330_M4_memory.ld",
"chars": 1288,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * Thi"
},
{
"path": "firmware/common/LPC43xx_M0_memory.ld",
"chars": 927,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * Thi"
},
{
"path": "firmware/common/LPC43xx_M4_M0_image_from_text.ld",
"chars": 994,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * Thi"
},
{
"path": "firmware/common/LPC43xx_M4_memory.ld",
"chars": 1393,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * Thi"
},
{
"path": "firmware/common/bitband.c",
"chars": 1981,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/bitband.h",
"chars": 1323,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/fault_handler.c",
"chars": 2227,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n * Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>\n *\n * "
},
{
"path": "firmware/common/fault_handler.h",
"chars": 2305,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/gpdma.c",
"chars": 2109,
"preview": "/*\n * Copyright 2013 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/gpdma.h",
"chars": 1457,
"preview": "/*\n * Copyright 2013 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/hackrf_core.c",
"chars": 10524,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n * Copyri"
},
{
"path": "firmware/common/hackrf_core.h",
"chars": 5439,
"preview": "/*\n * Copyright 2012 Michael Ossmann <mike@ossmann.com>\n * Copyright 2012 Benjamin Vernoux <titanmkd@gmail.com>\n * Copyr"
},
{
"path": "firmware/common/m0_bin.s.cmake",
"chars": 860,
"preview": "# Copyright 2013 Jared Boone <jared@sharebrained.com>\n#\n# This file is part of HackRF.\n#\n# This program is free software"
},
{
"path": "firmware/common/m0_sleep.c",
"chars": 849,
"preview": "/*\n * Copyright 2013 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/mcp4022.c",
"chars": 2008,
"preview": "#include <libopencm3/lpc43xx/gpio.h>\n#include <libopencm3/lpc43xx/scu.h>\n#include \"hackrf_core.h\"\n#include \"mcp4022.h\"\n\n"
},
{
"path": "firmware/common/mcp4022.h",
"chars": 123,
"preview": "\n#ifndef _MCP4022_H\n#define _MCP4022_H\n\n#define MCP_MAX_VALUE 63\n\nvoid mcp_init(void);\nvoid mcp_set(uint8_t val);\n\n\n#end"
},
{
"path": "firmware/common/rf_path.c",
"chars": 1502,
"preview": "#include <libopencm3/lpc43xx/gpio.h>\n#include <libopencm3/lpc43xx/scu.h>\n#include <libopencm3/lpc43xx/ssp.h>\n#include \"h"
},
{
"path": "firmware/common/rf_path.h",
"chars": 378,
"preview": "#ifndef _RF_PATH_H\n#define _RF_PATH_H\n\n\nvoid enable_adc(void);\nvoid disable_adc(void);\n\nvoid enable_pa(void);\nvoid disab"
},
{
"path": "firmware/common/rom_iap.c",
"chars": 3288,
"preview": "/*\n * Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>\n *\n * This file is part of HackRF.\n *\n * This program is free"
},
{
"path": "firmware/common/rom_iap.h",
"chars": 5170,
"preview": "/*\n * Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>\n *\n * This file is part of HackRF.\n *\n * This program is free"
},
{
"path": "firmware/common/sgpio.c",
"chars": 17317,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n * Copyright 2013 Benjamin Vernoux <titanmkd@gmail.com>\n *\n * "
},
{
"path": "firmware/common/sgpio.h",
"chars": 1192,
"preview": "/*\n * Copyright 2012 Jared Boone <jared@sharebrained.com>\n *\n * This file is part of HackRF.\n *\n * This program is free "
},
{
"path": "firmware/common/streaming.c",
"chars": 1265,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/common/streaming.h",
"chars": 972,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/common/usb.c",
"chars": 19471,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb.h",
"chars": 2293,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb_queue.c",
"chars": 7807,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Ben Gamari\n *\n * This file is part of HackRF.\n *\n * This program is f"
},
{
"path": "firmware/common/usb_queue.h",
"chars": 2970,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Ben Gamari\n *\n * This file is part of HackRF.\n *\n * This program is f"
},
{
"path": "firmware/common/usb_request.c",
"chars": 2549,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb_request.h",
"chars": 1787,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb_standard_request.c",
"chars": 9632,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb_standard_request.h",
"chars": 1539,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/usb_type.h",
"chars": 4290,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/common/w25q80bv.c",
"chars": 7359,
"preview": "/*\n * Copyright 2013 Michael Ossmann\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This pr"
},
{
"path": "firmware/common/w25q80bv.h",
"chars": 1848,
"preview": "/*\n * Copyright 2013 Michael Ossmann\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This pr"
},
{
"path": "firmware/hackrf-common.cmake",
"chars": 5590,
"preview": "# Copyright 2009 Uwe Hermann <uwe@hermann-uwe.de>\n# Copyright 2010 Piotr Esden-Tempski <piotr@esden.net>\n# Copyright 201"
},
{
"path": "firmware/hackrf_usb/CMakeLists.txt",
"chars": 1557,
"preview": "# Copyright 2012 Jared Boone <jared@sharebrained.com>\n#\n# This file is part of HackRF.\n#\n# This program is free software"
},
{
"path": "firmware/hackrf_usb/hackrf_usb.c",
"chars": 7295,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/sgpio_isr.c",
"chars": 2614,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/sgpio_isr.h",
"chars": 924,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_board_info.c",
"chars": 3184,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_board_info.h",
"chars": 1496,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_cpld.c",
"chars": 2356,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_cpld.h",
"chars": 1024,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_register.c",
"chars": 5958,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_register.h",
"chars": 1739,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_spiflash.c",
"chars": 4215,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_spiflash.h",
"chars": 1368,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_transceiver.c",
"chars": 6450,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_api_transceiver.h",
"chars": 2275,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_bulk_buffer.c",
"chars": 948,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_bulk_buffer.h",
"chars": 1283,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_descriptor.c",
"chars": 8447,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/hackrf_usb/usb_descriptor.h",
"chars": 1553,
"preview": "/*\n * Copyright 2012 Jared Boone\n *\n * This file is part of HackRF.\n *\n * This program is free software; you can redistr"
},
{
"path": "firmware/hackrf_usb/usb_device.c",
"chars": 2005,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_device.h",
"chars": 986,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_endpoint.c",
"chars": 2198,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/hackrf_usb/usb_endpoint.h",
"chars": 1370,
"preview": "/*\n * Copyright 2012 Jared Boone\n * Copyright 2013 Benjamin Vernoux\n *\n * This file is part of HackRF.\n *\n * This progra"
},
{
"path": "firmware/libopencm3/.gitignore",
"chars": 473,
"preview": "*.d\n*.o\n*.bin\n*.hex\n*.list\n*.srec\n*.a\n*.elf\nlib/*.ld\n*.swp\n\\#*\n.\\#*\n*~\n*.map\n*.log\nhtml/\nlatex/\n*.pdf\n*.tag\n.DS_Store\n# "
},
{
"path": "firmware/libopencm3/COPYING.GPL3",
"chars": 35068,
"preview": "\n\t\t GNU GENERAL PUBLIC LICENSE\n\t\t Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <"
},
{
"path": "firmware/libopencm3/COPYING.LGPL3",
"chars": 7651,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007"
},
{
"path": "firmware/libopencm3/HACKING",
"chars": 3807,
"preview": "------------------------------------------------------------------------------\nHACKING\n---------------------------------"
},
{
"path": "firmware/libopencm3/HACKING_COMMON_DOC",
"chars": 3122,
"preview": "Files for each peripheral (examples given for STM32 GPIO)\n---------------------------------------------------------\n\nIn "
},
{
"path": "firmware/libopencm3/Makefile",
"chars": 3463,
"preview": "##\n## This file is part of the libopencm3 project.\n##\n## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>\n##\n## This "
},
{
"path": "firmware/libopencm3/README",
"chars": 4885,
"preview": "------------------------------------------------------------------------------\nREADME\n----------------------------------"
},
{
"path": "firmware/libopencm3/doc/Doxyfile",
"chars": 1185,
"preview": "# Doxygen include file to generate top level entry document\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.o"
},
{
"path": "firmware/libopencm3/doc/Doxyfile_common",
"chars": 77363,
"preview": "# Doxyfile 1.8.2\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "firmware/libopencm3/doc/DoxygenLayout.xml",
"chars": 6911,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/HACKING",
"chars": 4079,
"preview": "libopencm3 Documentation\n12 October 2012 (C) K Sarkies\n-----------------------------\n\nEach family and subfamily of devic"
},
{
"path": "firmware/libopencm3/doc/Makefile",
"chars": 2678,
"preview": "# Makefile to build libopencm3 documentation\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\ndoc: ht"
},
{
"path": "firmware/libopencm3/doc/README",
"chars": 850,
"preview": "libopencm3 Documentation\n14 September 2012 (C) K Sarkies\n-------------------------------\n\nTo generate all documentation "
},
{
"path": "firmware/libopencm3/doc/cm3/Doxyfile",
"chars": 712,
"preview": "# HTML Documentation for CM3 Core features.\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/cm3/DoxygenLayout_cm3.xml",
"chars": 7314,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/efm32g/Doxyfile",
"chars": 900,
"preview": "# HTML Documentation for efm32 code level\n\n# 11 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/efm32g/Doxyfile_latex",
"chars": 983,
"preview": "# LaTeX Documentation for efm32 code level\n\n# 12 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------"
},
{
"path": "firmware/libopencm3/doc/efm32g/DoxygenLayout_efm32g.xml",
"chars": 7486,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/efm32g/header_efm32g.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/efm32gg/Doxyfile",
"chars": 905,
"preview": "# HTML Documentation for efm32 code level\n\n# 11 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/efm32gg/Doxyfile_latex",
"chars": 989,
"preview": "# LaTeX Documentation for efm32 code level\n\n# 12 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------"
},
{
"path": "firmware/libopencm3/doc/efm32gg/DoxygenLayout_efm32gg.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/efm32gg/header_efm32gg.tex",
"chars": 1592,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/efm32lg/Doxyfile",
"chars": 905,
"preview": "# HTML Documentation for efm32 code level\n\n# 11 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/efm32lg/Doxyfile_latex",
"chars": 989,
"preview": "# LaTeX Documentation for efm32 code level\n\n# 12 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------"
},
{
"path": "firmware/libopencm3/doc/efm32lg/DoxygenLayout_efm32lg.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/efm32lg/header_efm32lg.tex",
"chars": 1594,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/efm32tg/Doxyfile",
"chars": 905,
"preview": "# HTML Documentation for efm32 code level\n\n# 11 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/efm32tg/Doxyfile_latex",
"chars": 989,
"preview": "# LaTeX Documentation for efm32 code level\n\n# 12 November 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------"
},
{
"path": "firmware/libopencm3/doc/efm32tg/DoxygenLayout_efm32tg.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/efm32tg/header_efm32tg.tex",
"chars": 1591,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/lm3s/Doxyfile",
"chars": 844,
"preview": "# HTML Documentation for LM3S code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/lm3s/Doxyfile_latex",
"chars": 940,
"preview": "# LaTeX Documentation for LM3S code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------"
},
{
"path": "firmware/libopencm3/doc/lm3s/DoxygenLayout_lm3s.xml",
"chars": 7488,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/lm3s/header_lm3s.tex",
"chars": 1582,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/lm4f/Doxyfile",
"chars": 844,
"preview": "# HTML Documentation for LM3S code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#----------"
},
{
"path": "firmware/libopencm3/doc/lm4f/Doxyfile_latex",
"chars": 1012,
"preview": "# LaTeX Documentation for LM3S code level\n\n# 14 September 2012\n# Copyright (C) Ken Sarkies <ksarkies@internode.on.net>\n#"
},
{
"path": "firmware/libopencm3/doc/lm4f/DoxygenLayout_lm4f.xml",
"chars": 7488,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/lm4f/header_lm4f.tex",
"chars": 1582,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/lpc13xx/Doxyfile",
"chars": 862,
"preview": "# HTML Documentation for LPC13xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/lpc13xx/Doxyfile_latex",
"chars": 965,
"preview": "# LaTeX Documentation for LPC13xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/lpc13xx/DoxygenLayout_lpc13xx.xml",
"chars": 7385,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/lpc13xx/header_lpc13xx.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/lpc17xx/Doxyfile",
"chars": 862,
"preview": "# HTML Documentation for LPC17xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/lpc17xx/Doxyfile_latex",
"chars": 965,
"preview": "# LaTeX Documentation for LPC17xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/lpc17xx/DoxygenLayout_lpc17xx.xml",
"chars": 7385,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/lpc17xx/header_lpc17xx.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/lpc43xx/Doxyfile",
"chars": 862,
"preview": "# HTML Documentation for LPC43xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/lpc43xx/Doxyfile_latex",
"chars": 965,
"preview": "# LaTeX Documentation for LPC43xx code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/lpc43xx/DoxygenLayout_lpc43xx.xml",
"chars": 7385,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/lpc43xx/header_lpc43xx.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f0/Doxyfile",
"chars": 1190,
"preview": "# HTML Documentation for STM32F1 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/stm32f0/Doxyfile_latex",
"chars": 1290,
"preview": "# LaTeX Documentation for STM32F1 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32f0/DoxygenLayout_stm32f0.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32f0/header_stm32f0.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f0/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/stm32f1/Doxyfile",
"chars": 1190,
"preview": "# HTML Documentation for STM32F1 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/stm32f1/Doxyfile_latex",
"chars": 1290,
"preview": "# LaTeX Documentation for STM32F1 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32f1/DoxygenLayout_stm32f1.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32f1/header_stm32f1.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f1/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/stm32f2/Doxyfile",
"chars": 1024,
"preview": "# HTML Documentation for STM32F2 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/stm32f2/Doxyfile_latex",
"chars": 1089,
"preview": "# LaTeX Documentation for STM32F2 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32f2/DoxygenLayout_stm32f2.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32f2/header_stm32f2.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f2/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/stm32f3/Doxyfile",
"chars": 1243,
"preview": "# HTML Documentation for STM32F3 code level\n\n#--------------------------------------------------------------------------"
},
{
"path": "firmware/libopencm3/doc/stm32f3/Doxyfile_latex",
"chars": 1290,
"preview": "# LaTeX Documentation for STM32F3 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32f3/DoxygenLayout_stm32f3.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32f3/header_stm32f3.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f3/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/stm32f4/Doxyfile",
"chars": 1024,
"preview": "# HTML Documentation for STM32F4 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#-------"
},
{
"path": "firmware/libopencm3/doc/stm32f4/Doxyfile_latex",
"chars": 1092,
"preview": "# LaTeX Documentation for STM32F4 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32f4/DoxygenLayout_stm32f4.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32f4/header_stm32f4.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32f4/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/stm32l1/Doxyfile",
"chars": 1277,
"preview": "# HTML Documentation for STM32L1 code level\n\n# 15 December 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#--------"
},
{
"path": "firmware/libopencm3/doc/stm32l1/Doxyfile_latex",
"chars": 1264,
"preview": "# LaTeX Documentation for STM32L1 code level\n\n# 14 September 2012\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#------"
},
{
"path": "firmware/libopencm3/doc/stm32l1/DoxygenLayout_stm32l1.xml",
"chars": 7485,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/stm32l1/header_stm32l1.tex",
"chars": 1586,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/doc/stm32l1/index.html",
"chars": 203,
"preview": "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\" />\n</he"
},
{
"path": "firmware/libopencm3/doc/usb/Doxyfile",
"chars": 836,
"preview": "# HTML Documentation for USB code level\n\n# 10 March 2013\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#---------------"
},
{
"path": "firmware/libopencm3/doc/usb/Doxyfile_latex",
"chars": 975,
"preview": "# LaTeX Documentation for USB code level\n\n# 10 March 2013\n# (C) Ken Sarkies <ksarkies@internode.on.net>\n\n#--------------"
},
{
"path": "firmware/libopencm3/doc/usb/DoxygenLayout_usb.xml",
"chars": 7489,
"preview": "<doxygenlayout version=\"1.0\">\n <!-- Navigation index tabs for HTML output -->\n <navindex>\n <tab type=\"mainpage\" vis"
},
{
"path": "firmware/libopencm3/doc/usb/header_usb.tex",
"chars": 1577,
"preview": "\\documentclass{book}\n\\usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n\\usepackage{makeidx}\n\\"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/assert.h",
"chars": 4677,
"preview": "/** @defgroup debugging Debugging\n\n@brief Macros and functions to aid in debugging\n\n@version 1.0.0\n\n@date 25 September 2"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/common.h",
"chars": 2669,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>\n *\n * This "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/cortex.h",
"chars": 1009,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2013 Ben Gamari <bgamari@gmail.com>\n *\n * This li"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/doc-cm3.h",
"chars": 350,
"preview": "/** @mainpage libopencm3 Core CM3\n\n@version 1.0.0\n\n@date 14 September 2012\n\nAPI documentation for Cortex M3 core feature"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/fpb.h",
"chars": 2383,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/itm.h",
"chars": 2771,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/memorymap.h",
"chars": 3132,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>\n *\n * This "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/mpu.h",
"chars": 3721,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2013 Frantisek Burian <BuFran@seznam.cz>\n *\n * Th"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/scb.h",
"chars": 15748,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>\n * Cop"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/scs.h",
"chars": 12847,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/sync.h",
"chars": 1658,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2012 Fergus Noble <fergusnoble@gmail.com>\n *\n * T"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/systick.h",
"chars": 4464,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>\n * Copyright"
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/tpiu.h",
"chars": 3670,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/cm3/vector.h",
"chars": 2389,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2012 chrysn <chrysn@fsfe.org>\n *\n * This library "
},
{
"path": "firmware/libopencm3/include/libopencm3/docmain.dox",
"chars": 504,
"preview": "/** @mainpage libopencm3 Developer Documentation\n\n@version 1.0.0\n\n@date 7 September 2012\n\n * The libopencm3 project (pre"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32g/doc-efm32g.h",
"chars": 554,
"preview": "/** @mainpage libopencm3 EFM32 Gecko\n\n@version 1.0.0\n\n@date 11 November 2012\n\nAPI documentation for Energy Micro EFM32 G"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32g/irq.yaml",
"chars": 530,
"preview": "includeguard: LIBOPENCM3_EFM32G_NVIC_H\npartname_humanreadable: EFM32 Gecko series\npartname_doxygen: EFM32G\n# The names a"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32gg/doc-efm32gg.h",
"chars": 592,
"preview": "/** @mainpage libopencm3 EFM32 Giant Gecko\n\n@version 1.0.0\n\n@date 11 November 2012\n\nAPI documentation for Energy Micro E"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32gg/irq.yaml",
"chars": 623,
"preview": "includeguard: LIBOPENCM3_EFM32GG_NVIC_H\npartname_humanreadable: EFM32 Giant Gecko series\npartname_doxygen: EFM32GG\n# The"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32lg/doc-efm32lg.h",
"chars": 591,
"preview": "/** @mainpage libopencm3 EFM32 Leopard Gecko\n\n@version 1.0.0\n\n@date 4 March 2013\n\nAPI documentation for Energy Micro EFM"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32lg/irq.yaml",
"chars": 625,
"preview": "includeguard: LIBOPENCM3_EFM32LG_NVIC_H\npartname_humanreadable: EFM32 Leopard Gecko series\npartname_doxygen: EFM32LG\n# T"
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32tg/doc-efm32tg.h",
"chars": 573,
"preview": "/** @mainpage libopencm3 EFM32 Tiny Gecko\n\n@version 1.0.0\n\n@date 4 March 2013\n\nAPI documentation for Energy Micro EFM32 "
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32tg/irq.yaml",
"chars": 453,
"preview": "includeguard: LIBOPENCM3_EFM32TG_NVIC_H\npartname_humanreadable: EFM32 Tiny Gecko series\npartname_doxygen: EFM32TG\n# The "
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/efm32tg/memorymap.h",
"chars": 2978,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2012 chrysn <chrysn@fsfe.org>\n *\n * This library "
},
{
"path": "firmware/libopencm3/include/libopencm3/efm32/memorymap.h",
"chars": 1119,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2012 chrysn <chrysn@fsfe.org>\n *\n * This library "
},
{
"path": "firmware/libopencm3/include/libopencm3/license.dox",
"chars": 677,
"preview": "/** @page lgpl_license libopencm3 License\n\nlibopencm3 is free software: you can redistribute it and/or modify\nit under t"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm3s/doc-lm3s.h",
"chars": 502,
"preview": "/** @mainpage libopencm3 LM3S\n\n@version 1.0.0\n\n@date 14 September 2012\n\nAPI documentation for TI Stellaris LM3S Cortex M"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm3s/gpio.h",
"chars": 3082,
"preview": "/** @defgroup gpio_defines General Purpose I/O Defines\n\n@brief <b>Defined Constants and Types for the LM3S General Purpo"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm3s/irq.yaml",
"chars": 2055,
"preview": "# Although this says LM3S, the interrupt table applies to the LM4F as well\n# Some interrupt vectores marked as reserved "
},
{
"path": "firmware/libopencm3/include/libopencm3/lm3s/memorymap.h",
"chars": 1586,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/lm3s/systemcontrol.h",
"chars": 3393,
"preview": "/** @defgroup systemcontrol_defines System Control\n\n@brief <b>Defined Constants and Types for the LM3S System Control</b"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/doc-lm4f.h",
"chars": 501,
"preview": "/** @mainpage libopencm3 LM4F\n\n@version 1.0.0\n\n@date 22 November 2012\n\nAPI documentation for TI Stellaris LM4F Cortex M4"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/gpio.h",
"chars": 11987,
"preview": "/** @defgroup gpio_defines General Purpose I/O Defines\n *\n * @brief <b>Defined Constants and Types for the LM4F General "
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/memorymap.h",
"chars": 2162,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>\n "
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/rcc.h",
"chars": 4050,
"preview": "/** @defgroup rcc_defines Reset and Clock Control\n\n@brief <b>Defined Constants and Types for the LM4F Reset and Clock Co"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/systemcontrol.h",
"chars": 25670,
"preview": "/** @defgroup systemcontrol_defines System Control\n\n@brief <b>Defined Constants and Types for the LM4F System Control</b"
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/uart.h",
"chars": 17691,
"preview": "/** @defgroup uart_defines UART Control\n *\n * @brief <b>Defined Constants and Types for the LM4F UART Control</b>\n *\n * "
},
{
"path": "firmware/libopencm3/include/libopencm3/lm4f/usb.h",
"chars": 13989,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>\n *\n"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc13xx/doc-lpc13xx.h",
"chars": 534,
"preview": "/** @mainpage libopencm3 LPC13xx\n\n@version 1.0.0\n\n@date 14 September 2012\n\nAPI documentation for NXP Semiconductors LPC1"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc13xx/gpio.h",
"chars": 3844,
"preview": "/** @defgroup gpio_defines GPIO Defines\n\n@brief <b>Defined Constants and Types for the LPC13xx General Purpose I/O</b>\n\n"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc13xx/irq.yaml",
"chars": 837,
"preview": "includeguard: LIBOPENCM3_LPC13xx_NVIC_H\npartname_humanreadable: LPC 13xx series\npartname_doxygen: LPC13xx\nirqs:\n 0: pio"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc13xx/memorymap.h",
"chars": 2253,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>\n *\n * This "
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc17xx/doc-lpc17xx.h",
"chars": 534,
"preview": "/** @mainpage libopencm3 LPC17xx\n\n@version 1.0.0\n\n@date 14 September 2012\n\nAPI documentation for NXP Semiconductors LPC1"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc17xx/gpio.h",
"chars": 5797,
"preview": "/** @defgroup gpio_defines GPIO Defines\n\n@brief <b>Defined Constants and Types for the LPC17xx General Purpose I/O</b>\n\n"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc17xx/irq.yaml",
"chars": 508,
"preview": "includeguard: LIBOPENCM3_LPC17xx_NVIC_H\npartname_humanreadable: LPC 17xx series\npartname_doxygen: LPC17xx\nirqs:\n 0: wdt"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc17xx/memorymap.h",
"chars": 2607,
"preview": "/*\n * This file is part of the libopencm3 project.\n *\n * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>\n *\n * This "
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc43xx/adc.h",
"chars": 3977,
"preview": "/** @defgroup adc_defines ADC Defines\n\n@brief <b>Defined Constants and Types for the LPC43xx A/D Converter</b>\n\n@ingroup"
},
{
"path": "firmware/libopencm3/include/libopencm3/lpc43xx/atimer.h",
"chars": 2090,
"preview": "/** @defgroup atimer_defines Alarm Timer Defines\n\n@brief <b>Defined Constants and Types for the LPC43xx Alarm Timer</b>\n"
}
]
// ... and 528 more files (download for full content)
About this extraction
This page contains the full source code of the Ttl/fmcw2 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 728 files (5.3 MB), approximately 1.4M tokens, and a symbol index with 1778 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.