Commit Graph

14 Commits

Author SHA1 Message Date
Karl Palsson c72f3d588a Surround all macro parameters with ()
All the macro arguments that are user supplied, or potentially, wrap properly
in () as good practice.

Probably missed one or two, and a lot of them are possibly unnecessary, but
it's straightforward to just do it always.

Fixes github issue #321
2015-10-14 22:15:15 +00:00
Piotr Esden-Tempski 2f425af647 [Style] A small coding style fixing session. 2013-07-05 20:35:13 -07:00
Piotr Esden-Tempski 8da7fbd71e Changed to use accessors instead of casting to volatile pointers.
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)
2013-06-12 21:37:55 -07:00
Piotr Esden-Tempski 39fa9e4c58 Stile fixes run, 80 char boundry. 2013-06-12 21:07:35 -07:00
Piotr Esden-Tempski 34de1e776e Changed to use stdint types. 2013-06-12 19:11:22 -07:00
Piotr Esden-Tempski 7df63fcae0 First coarse run to fix coding style in locm3.
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.
2013-06-12 18:22:56 -07:00
Alexandru Gagniuc 4535a4c9b6 lm4f: Implement GPIO interrupt control
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>
2013-06-02 16:16:46 -07:00
Alexandru Gagniuc f53839f33f lm4f: Implement GPIO configuration and control
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>
2013-06-02 16:16:46 -07:00
Alexandru Gagniuc a3784aa54f lm4f: Add GPIO register definitions
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-06-02 16:16:46 -07:00
Alexandru Gagniuc de55bbc46e lm4f: "Pretty-ize" the look of Doxygen comments in gpio.c/.h
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>
2013-06-02 16:16:46 -07:00
Alexandru Gagniuc 4c45702d2d lm4f: Switch GPIOs to using AHB bus ***WARNING***
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>
2013-06-02 16:16:46 -07:00
Ken Sarkies 1627cd60c3 Documentation structures added to place the non-STM32 families into the documentation tree.
Actual documentation has not been added. Volunteers?
2013-04-14 15:30:02 +02:00
Alexandru Gagniuc b2ac2ffc4b lm4f: Remove erroneous references to lm3s
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-31 01:35:27 -06:00
Alexandru Gagniuc 326c945b55 lm4f: Add lm4f support files copied from lm3s
Create lm4f code infrastructure from the lm3s infrastructure.

As far as the interrupt table is concerned, don't create an irq.yaml. Just
include the LM3S nvic.h. The LM3S vector table seems to be compatible with the
LM4F

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-31 01:35:25 -06:00