Hi Sid,

There aren't too many differences other than the old one takes a bit mask
and pointer to a register and the new one just takes an enum. The old one
required you to know which RCC enable register you had to set the bits in
but it also let you set multiple bits at the same time in the same
register, the new one encodes the register it needs in the enum but you can
only set one at a time.

In general the new one is easier, and certainly requires fewer (if any)
referring to the docs to get 'right'. RCC_peripheralname is the enum value
to enable so RCC_GPIOA is GPIOA and RCC_SPI2 is the second SPI port.

--Chuck

On Fri, Jan 27, 2017 at 1:34 PM, Sid Price <sidpr...@softtools.com> wrote:

> I am building a USB device based upon STM32F411RE, the source code uses an
> older version of libopencm3. It uses the old-style peripheral clock
> enables, e.g. rcc_peripheral_enable_clock and I would like to update it to
> use the newer “rcc_periph_clock_enable” method. Are there some notes
> anywhere about how to do this, since I am very new to libopencm3 and don’t
> fully understand the differences?
>
>
>
> Thanks
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> libopencm3-devel mailing list
> libopencm3-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
libopencm3-devel mailing list
libopencm3-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to