From 3e71a57f67ce0dde62e942dfa33bf38d64262916 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Apr 2019 00:11:23 -0400 Subject: lpc176x: Use enumerations for buses and reserve pins Signed-off-by: Kevin O'Connor --- src/lpc176x/spi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lpc176x/spi.c') diff --git a/src/lpc176x/spi.c b/src/lpc176x/spi.c index e959877c..bfdb8fe8 100644 --- a/src/lpc176x/spi.c +++ b/src/lpc176x/spi.c @@ -10,6 +10,9 @@ #include "internal.h" // gpio_peripheral #include "sched.h" // sched_shutdown +DECL_ENUMERATION("spi_bus", "ssp0", 0); +DECL_CONSTANT_STR("BUS_PINS_ssp0", "P0.17,P0.18,P0.15"); + static void spi_init(void) { @@ -18,10 +21,10 @@ spi_init(void) return; have_run_init = 1; - // Configure SCK0, MISO0, MOSI0 pins - gpio_peripheral(GPIO(0, 15), 2, 0); + // Configure MISO0, MOSI0, SCK0 pins gpio_peripheral(GPIO(0, 17), 2, 0); gpio_peripheral(GPIO(0, 18), 2, 0); + gpio_peripheral(GPIO(0, 15), 2, 0); // Setup clock enable_pclock(PCLK_SSP0); -- cgit v1.2.3-70-g09d2