From 71d96e90448ce9c7c69ab69533b4dacac6f4f1b6 Mon Sep 17 00:00:00 2001 From: babbleberry Date: Mon, 22 Apr 2024 09:54:15 +0100 Subject: [PATCH] Fixed pull up/pull down being the wrong way around --- part10-multicore/io.c | 4 ++-- part11-breakout-smp/lib/io.c | 4 ++-- part12-wgt/lib/io.c | 4 ++-- part13-interrupts/lib/io.c | 4 ++-- part14-spi-ethernet/lib/io.c | 4 ++-- part15-tcpip-webserver/lib/io.c | 4 ++-- part4-miniuart/io.c | 4 ++-- part5-framebuffer/io.c | 4 ++-- part6-breakout/io.c | 4 ++-- part7-bluetooth/io.c | 4 ++-- part8-breakout-ble/io.c | 4 ++-- part9-sound/io.c | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/part10-multicore/io.c b/part10-multicore/io.c index a2a888d..b9ba71f 100644 --- a/part10-multicore/io.c +++ b/part10-multicore/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part11-breakout-smp/lib/io.c b/part11-breakout-smp/lib/io.c index 34a02aa..77e23eb 100644 --- a/part11-breakout-smp/lib/io.c +++ b/part11-breakout-smp/lib/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part12-wgt/lib/io.c b/part12-wgt/lib/io.c index 34a02aa..77e23eb 100644 --- a/part12-wgt/lib/io.c +++ b/part12-wgt/lib/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part13-interrupts/lib/io.c b/part13-interrupts/lib/io.c index 34a02aa..77e23eb 100644 --- a/part13-interrupts/lib/io.c +++ b/part13-interrupts/lib/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part14-spi-ethernet/lib/io.c b/part14-spi-ethernet/lib/io.c index 34a02aa..77e23eb 100644 --- a/part14-spi-ethernet/lib/io.c +++ b/part14-spi-ethernet/lib/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part15-tcpip-webserver/lib/io.c b/part15-tcpip-webserver/lib/io.c index 6a7b221..4443799 100644 --- a/part15-tcpip-webserver/lib/io.c +++ b/part15-tcpip-webserver/lib/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part4-miniuart/io.c b/part4-miniuart/io.c index 9561780..d7b2985 100644 --- a/part4-miniuart/io.c +++ b/part4-miniuart/io.c @@ -17,8 +17,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part5-framebuffer/io.c b/part5-framebuffer/io.c index e8af328..b58f996 100644 --- a/part5-framebuffer/io.c +++ b/part5-framebuffer/io.c @@ -18,8 +18,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part6-breakout/io.c b/part6-breakout/io.c index e06b64d..c5134ab 100644 --- a/part6-breakout/io.c +++ b/part6-breakout/io.c @@ -18,8 +18,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part7-bluetooth/io.c b/part7-bluetooth/io.c index 8a591b7..33b3962 100644 --- a/part7-bluetooth/io.c +++ b/part7-bluetooth/io.c @@ -18,8 +18,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part8-breakout-ble/io.c b/part8-breakout-ble/io.c index 8a591b7..33b3962 100644 --- a/part8-breakout-ble/io.c +++ b/part8-breakout-ble/io.c @@ -18,8 +18,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; } diff --git a/part9-sound/io.c b/part9-sound/io.c index a2a888d..b9ba71f 100644 --- a/part9-sound/io.c +++ b/part9-sound/io.c @@ -19,8 +19,8 @@ enum { enum { Pull_None = 0, - Pull_Down = 1, // Are down and up the right way around? - Pull_Up = 2 + Pull_Down = 2, + Pull_Up = 1 }; void mmio_write(long reg, unsigned int val) { *(volatile unsigned int *)reg = val; }