We should not add compiler extensions, it is not our job. We are not a
selfcontained project as kernel is so we should not introduce things
like this.
If we need to add some abstraction for this in the future to support
compilers doing these things differently then we will do that the same
way we dealt with the depricated attribute.
In places where we were defining memory mapped peripheral buffers we
were using directly a cast to "volatile int_type *". For consistency we
should use dereferenced accessor like: &MMIO32(address)
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.
We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
only contain one statement. Otherwise it is easy to introduce an
error.
Checkpatch needs to be adapted to reflect those changes.
Added hash processor register definitions and main functions. Hash
processor is supported in stm32f21, stm32f41 and stm32f43 and can be
used to calculate Md5 and Sha1.
Implement an API to specifiy the interrupt trigger for GPIO pins, and
control interrupts. This completes the GPIO API.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Everything needed to set up and control the GPIO pins is implemented,
EXCEPT setting up interrupts. This is the subject of a subsequent patch.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Put the Doxygen blocks in well-formatted C comments. This looks better
and is less distracting than putting them in unformatted comments.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
The AHB bus allows faster control of GPIO pins versus the older APB bus.
The GPIO ports A through H default on the APB bus. Change the GPIOx
defines in gpio.h to use the base address of the AHB bus.
There's another reason to use the AHB bus: ports K tand highercan only be
accessed via the AHB bus.
***WARNING***
To work, GPIO acces to the AHB bus must be explictly enabled via the
GPIOHBCTL register. Without any additional change, this patch will break
any code using the older APB bus. If the GPIOHBCTL is not properly
modified, any acces to the GPIO register will cause a hard fault.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Add functions to enable and disable USB interrupts, and document how to
use these functions to run usbd_poll() from the usb ISR.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Change flash_erase_sector (f2/f4) to take numerical sector argument.
As opposed to using one of the defines in the header, this is more convenient when programatically deciding which sectors to erase.
Add a complete API for controlling the UART interrupts.
Doxygen documentation with inline code examples is also provided in this patch.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Add basic functionality needed to setup the UART and send/recieve data.
Interrupts, DMA, and more advanced features are not implemented in this patch.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
By somo copypaste error, the doxygen group rcc_defines was defined twice.
Don't do that. Keep Ken's doxygen structure and drop the old one.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>