Now type GPIO_Port_Configuration is a discriminated record with a variant part, so we cannot accidentally specify configuration components that don't apply to the specified mode. The record type now also includes the alternate function component value so that when Mode_AF is specified the AF value must also be specified. The procedure Configure_IO now also configures the AF value. Note that the separate procedure for configuring the AF value is still available, and occasionally useful.
The code now uses aggregates for most uses of GPIO_Port_Configuration values and caught a couple of places where some expected values were not specified (the pin speed, in particular).
I compiled everything using this type but not the OpenMV2 stuff, for lack of a toolchain and board.
I compiled and tested all the STM32 boards stuff but did not test the F769 Disco stuff for lack of a board. I did test it on the F746.
Now type GPIO_Port_Configuration is a discriminated record with a variant part, so we cannot accidentally specify configuration components that don't apply to the specified mode. The record type now also includes the alternate function component value so that when Mode_AF is specified the AF value must also be specified. The procedure Configure_IO now also configures the AF value. Note that the separate procedure for configuring the AF value is still available, and occasionally useful.
The code now uses aggregates for most uses of GPIO_Port_Configuration values and caught a couple of places where some expected values were not specified (the pin speed, in particular).
I compiled everything using this type but not the OpenMV2 stuff, for lack of a toolchain and board. I compiled and tested all the STM32 boards stuff but did not test the F769 Disco stuff for lack of a board. I did test it on the F746.