Re: STM32 GPIO BSRR
Uwe Bonnes <bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org> Thu, 21 Apr 2016 12:14:11 +0200
| Newsgroups | gmane.comp.hardware.microcontrollers.ethernut |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Holger" == Holger Mai <[email protected]> writes: Holger> for my sources i use often the BSRRH and BSRRL registers in Holger> GPIO_Typedef. They based on BSRR (32bit), but if splitted in Holger> BSRRH and BSRRL, setting/resetting bits is simpler than on BSRR, Holger> because can use the same bitmask for set/reset, without any Holger> shifting. However, i found that some headerfiles from ST has Holger> BSRR in GPIO_TypeDef, some other has BSRRH and BSRRL. And there Holger> are files for the same MCU with different GPIO_TypeDef's. For Holger> me, i find it a good idea, to work with one or other access, so Holger> as i need it. To realise this, the MCU decription files Holger> (i.e. STM32F756xx.h) has to be edited: Did you have a look at the macros in include/dev/gpio.h : GpioPortSetHigh(), GpioPortSetLow(), GpioPinSetHigh() and GpioPinSetLow()? They should handle BRR vs. BSSR vs. BSSRH and BSSRL. Otherwise for a change in the vendor headers, try to talk to STM perhaps in the "STM32 Software Tools and Firmware" forum. From my side, I want as few change to the vendor headers as possible. Cheers -- Uwe Bonnes bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 1623569 ------- Fax. 06151 1623305 --------- _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion