Commit graph

3 commits

Author SHA1 Message Date
Marti Bolivar 853d0b1a5a HardwareSPI: move warning into .cpp from header.
This causes the warning to be emitted at most once. As is, it can be
emitted each time HardwareSPI.h is included, which is annoying.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-08-27 16:50:57 -04:00
Marti Bolivar 97b01c0b98 Globally switch style for GPIO config routines.
Stupidly, spi_gpio_cfg() didn't take a spi_dev* argument on F1,
because it doesn't matter there. On F2, where we need to set an
alternate function when configuring GPIOs for SPI, we need to know the
dev.

We can't add break backwards compatibility, so we need a new
function. However, we've since added a bunch of foo_gpio_cfg()
routines, and we don't want confusing asymmetry in the names. So a
global style change is needed. (Fortunately, the new functions weren't
part of a release, so it's no problem to change their names).

Change all foo_gpio_cfg() routines to foo_config_gpios() (or
foo_config_gpio(), if there's only one GPIO to configure). For
backwards compatibility, make spi_gpio_cfg() on F1 an __always_inline
call to spi_config_gpios().

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-06-03 02:15:22 -04:00
Marti Bolivar 4b826727d0 Move wirish/comm/*.cpp into wirish.
The wirish/comm/ directory is stupid.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
2012-04-11 16:56:50 -04:00
Renamed from wirish/comm/HardwareSPI.cpp (Browse further)