.. index:: plang-reader .. _plang-reader: .. Created plang-reader.rst: Sat 23 Jul 2022 17:04:21 AEST .. Full Path: /home/tp/mecrisp-unofficial-doc/plang-reader.rst .. Author Copyright 2022 by t.j.porter .. Made by /home/tp/projects/scripts/makerst.sh -->/usr/local/bin/makerst .. license: MIT, please see COPYING Plang Reader ============ A command line interface PLANG reader which is hardwired to read a PLANG database named bitfields.db in the same directory. Plang has been tested under FreeBSD but not any other Unix as yet. * Download Plang by itself: https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/plang/download * Download Plang STM32F051 Package: https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/plang-v1-stm32f051.tar.gz/download * Download Plang STM32F103 Package: https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/plang-v1-stm32f103.tar.gz/download * Download Plang STM32F407 Package: https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/plang-v1-STM32F407.tar.gz/download Usage ----- :: PLANG A Peripheral Language for Microcontrollers. This PLANG reader is hardwired to read a PLANG Sqlite3 database named "bitfields.db" in the same directory. USAGE plang -p -d ] [-S --Search] or [-L --List peripherals] plang -h --This Help plang -v --Version and Copyright notice. EXAMPLES List all peripherals: ./plang -L or plang -p xxx -b xxx -d xxx -L List everything in the *peripheral* "CRC": ./plang -p crc -S Search "CRC" where the *description* is like "reset": ./plang -p crc -d reset -S Search "CRC" where the (Bitfield) *name* is like "reset": ./plang -p crc -b reset -S Search "CRC" where the (Bitfield) *name* is like "in" and the *description* is like "reverse": ./plang -p crc -b in -d reverse -S SEARCH Uses "is like" (not "equals") and is case independent. -p, -b and -d are ANDed together. DEPENDENCIES Unix, Sqlite, Shell, Getopt Examples -------- For the STM32F051 List all peripherals ^^^^^^^^^^^^^^^^^^^^ "L" overrides any existing search parameters. This makes it easy to switch between Listing and Searching. :: plang -L or plang -p xxx -b xxx -d xxx -L ./plang -L ADC DAC Flash GPIOD I2C2 RCC SYSCFG TIM16 TIM6 WWDG CEC DBGMCU GPIOA GPIOE IWDG RTC TIM1 TIM17 TSC COMP DMA GPIOB GPIOF NVIC SPI1 TIM14 TIM2 USART1 CRC EXTI GPIOC I2C1 PWR SPI2 TIM15 TIM3 USART2 ./plang -p xxx -b xxx -d xxx -L ADC DAC Flash GPIOD I2C2 RCC SYSCFG TIM16 TIM6 WWDG CEC DBGMCU GPIOA GPIOE IWDG RTC TIM1 TIM17 TSC COMP DMA GPIOB GPIOF NVIC SPI1 TIM14 TIM2 USART1 CRC EXTI GPIOC I2C1 PWR SPI2 TIM15 TIM3 USART2 WEB PAGE https://mecrisp-stellaris-folkdoc.sourceforge.io/plang-reader.html Search Examples --------------- Peripheral Only ^^^^^^^^^^^^^^^ List everything in the *peripheral* "CRC" :: ./plang -p crc -S name stack word access bitwidth bitoffset description ------------------------- ---------------------- -------------------- ------ -------- --------- ---------------------------------------- cyclic redundancy check - - - - - - CRC_DR Reset Value $FFFFFFFF - - - - - CRC_DR_DR<< ( %32 -- x ) rw 32 0 Data register bits CRC_IDR Reset Value $00000000 - - - - - CRC_IDR_IDR<< ( %8 -- x ) rw 8 0 General-purpose 8-bit data register bit CRC_CR Reset Value $00000000 - - - - - CRC_CR_RESET ( -- 1 ) 1 rw 1 0 reset bit CRC_CR_REV_IN<< ( %2 -- x ) 5 lshift rw 2 5 Reverse input data CRC_CR_REV_OUT ( -- x ) 1 7 lshift rw 1 7 Reverse output data CRC_INIT stm32f103c8 Reset Value $FFFFFFFF - - - - - CRC_INIT_INIT<< ( %32 -- x ) rw 32 0 Programmable initial CRC value Peripheral and Description ^^^^^^^^^^^^^^^^^^^^^^^^^^ "CRC" where the *description* is like "reset" :: ./plang -p crc -d reset -S name stack word access bitwidth bitoffset description ------------------------- ---------------------- -------------------- ------ -------- --------- ---------------------------------------- CRC_CR_RESET ( -- 1 ) 1 rw 1 0 reset bit Peripheral and Name ^^^^^^^^^^^^^^^^^^^ "CRC" where the (Bitfield) *name* is like "reset" :: ./plang -p crc -b reset -S name stack word access bitwidth bitoffset description ------------------------- ---------------------- -------------------- ------ -------- --------- ---------------------------------------- CRC_CR_RESET ( -- 1 ) 1 rw 1 0 reset bit Peripheral, Name and Description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "CRC" where the (Bitfield) *name* is like "in" and the *description* is like "reverse" :: ./plang -p crc -b in -d reverse -S name stack word access bitwidth bitoffset description ------------------------- ---------------------- -------------------- ------ -------- --------- ---------------------------------------- CRC_CR_REV_IN<< ( %2 -- x ) 5 lshift rw 2 5 Reverse input data .. seealso:: :ref:`PLANG` .. seealso:: :ref:`Bitfields` .. seealso:: :ref:`Plang for STM32F103C8`