From 07b98cb0c32cb535d765d2e65bf92eeda8a649bc Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 13 Jul 2024 18:27:31 +0100 Subject: [PATCH] rpipico: doc maker pi pins, clean up oddments from submission --- Kernel/platform/platform-rpipico/Makefile | 4 ++-- Kernel/platform/platform-rpipico/config.h | 7 ++++++- Kernel/platform/platform-rpipico/devgpio.c | 7 ------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Kernel/platform/platform-rpipico/Makefile b/Kernel/platform/platform-rpipico/Makefile index a6d6a39ff..6ca330859 100644 --- a/Kernel/platform/platform-rpipico/Makefile +++ b/Kernel/platform/platform-rpipico/Makefile @@ -1,6 +1,6 @@ # Set one of these depending. -#export PICO_SDK_FETCH_FROM_GIT = yes -export PICO_SDK_PATH = ${HOME}/.pico-sdk/sdk/1.5.1 +export PICO_SDK_FETCH_FROM_GIT = yes +#export PICO_SDK_PATH = ${HOME}/.pico-sdk/sdk/1.5.1 include ../../../version.mk diff --git a/Kernel/platform/platform-rpipico/config.h b/Kernel/platform/platform-rpipico/config.h index 5bd7d82d9..f9f69dcaa 100644 --- a/Kernel/platform/platform-rpipico/config.h +++ b/Kernel/platform/platform-rpipico/config.h @@ -8,6 +8,11 @@ * TX GPIO 15 * RX GPIO 12 * CS GPIO 13 + * CONFIG_MAKER_PI + * SCK GPIO 10 + * TX GPIO 11 + * RX GPIO 12 + * CS GPIO 15 * If Undefined * SCK GPIO 2 * TX GPIO 3 @@ -15,7 +20,7 @@ * CS GPIO 5 */ -#define CONFIG_MAKER_PI +#define CONFIG_RC2040 /* We have a GPIO interface */ #define CONFIG_DEV_GPIO diff --git a/Kernel/platform/platform-rpipico/devgpio.c b/Kernel/platform/platform-rpipico/devgpio.c index 8b4207c6c..b855ead8d 100644 --- a/Kernel/platform/platform-rpipico/devgpio.c +++ b/Kernel/platform/platform-rpipico/devgpio.c @@ -22,18 +22,11 @@ int gpio_ioctl(uarg_t request, char *data) { } switch (request) { - case GPIOC_SETBYTE: - break; case GPIOC_SET: gpio_init(gr.pin); gpio_set_dir(gr.pin, GPIO_OUT); gpio_put(gr.pin, gr.val != 0); return 0; - break; - default: - udata.u_error = ENODEV; - return -1; } - return -1; } \ No newline at end of file