Constants
Constants are just a pattern file $(CONSTANTS_PAT) where the project constants are saved. This file can be modified at any time and is read when make all is entered.
Note: search and replace is a complex process, and Gema is not trivial. To use Gema well one must read all the Gema notes and examples.
Basic Rules
- Comment - '!'
- Search Term - whatever is on the left of the equal sign
- Replacement Term - whatever is on the right of the equal sign
- '%' - Forth symbol for binary
! MODER INPUT=%00 OUTPUT=%01 AF=%10 ANALOG=%11! ALTERNATE FUNCTION AF0=%0000 AF1=%0001 AF2=%0010 AF3=%0011 AF4=%0100 AF5=%0101 AF6=%0110 AF7=%0111
! OTYPER PUSH-PULL=0 OPEN-DRAI=1
! PUPDR NO-PULL=%00 ! No pull-up or pull-down PULL-UP=%01 PULL-DOWN= ! ( 11: Reserved )! MODER INPUT=%00 OUTPUT=%01 AF=%10 ANALOG=%11
! ALTERNATE FUNCTION AF0=%0000 AF1=%0001 AF2=%0010 AF3=%0011 AF4=%0100 AF5=%0101 AF6=%0110 AF7=%0111
! OTYPER PUSH-PULL=0 OPEN-DRAI=1
! PUPDR NO-PULL=%00 ! No pull-up or pull-down PULL-UP=%01 PULL-DOWN= ! ( 11: Reserved )
! OSPEEDR LOW-SPEED=%00 MEDIUM-SPEED=%01 HIGH-SPEED=%11
! OSPEEDR LOW-SPEED=%00 MEDIUM-SPEED=%01 HIGH-SPEED=%11