From 8d2d3a01885cc5802d9a8fe3d342b8cf9d3a664e Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:41:11 +0100 Subject: [PATCH] SPI pins are fixed, considered in json files and readme --- .../boards/mobiflight_GNC255_mega.board.json | 18 ------------------ .../boards/mobiflight_GNC255_pico.board.json | 18 ------------------ .../devices/mobiflight.gnc255.device.json | 2 -- GNC255/MFCustomDevice.cpp | 4 ---- README.md | 6 +++++- 5 files changed, 5 insertions(+), 43 deletions(-) diff --git a/GNC255/Community/boards/mobiflight_GNC255_mega.board.json b/GNC255/Community/boards/mobiflight_GNC255_mega.board.json index c038758..b15d405 100644 --- a/GNC255/Community/boards/mobiflight_GNC255_mega.board.json +++ b/GNC255/Community/boards/mobiflight_GNC255_mega.board.json @@ -355,24 +355,6 @@ "isPWM": false, "Pin": 49 }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": false, - "Pin": 50 - }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": false, - "Pin": 51 - }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": false, - "Pin": 52 - }, { "isAnalog": false, "isI2C": false, diff --git a/GNC255/Community/boards/mobiflight_GNC255_pico.board.json b/GNC255/Community/boards/mobiflight_GNC255_pico.board.json index 5bb17e6..3823632 100644 --- a/GNC255/Community/boards/mobiflight_GNC255_pico.board.json +++ b/GNC255/Community/boards/mobiflight_GNC255_pico.board.json @@ -145,30 +145,12 @@ "isPWM": true, "Pin": 15 }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": true, - "Pin": 16 - }, { "isAnalog": false, "isI2C": false, "isPWM": true, "Pin": 17 }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": true, - "Pin": 18 - }, - { - "isAnalog": false, - "isI2C": false, - "isPWM": true, - "Pin": 19 - }, { "isAnalog": false, "isI2C": false, diff --git a/GNC255/Community/devices/mobiflight.gnc255.device.json b/GNC255/Community/devices/mobiflight.gnc255.device.json index 24cc461..fe9e24a 100644 --- a/GNC255/Community/devices/mobiflight.gnc255.device.json +++ b/GNC255/Community/devices/mobiflight.gnc255.device.json @@ -9,8 +9,6 @@ }, "Config": { "Pins": [ - "CLK", - "Data", "CS", "D/C", "Reset" diff --git a/GNC255/MFCustomDevice.cpp b/GNC255/MFCustomDevice.cpp index 64a8a8a..c48d841 100644 --- a/GNC255/MFCustomDevice.cpp +++ b/GNC255/MFCustomDevice.cpp @@ -93,10 +93,6 @@ void MFCustomDevice::attach(int16_t adrPin, uint16_t adrType, uint16_t adrConfig multiple devices, it is done here. ********************************************************************************************** */ params = strtok_r(parameter, "|", &p); - _clk = atoi(params); - params = strtok_r(NULL, "|", &p); - _data = atoi(params); - params = strtok_r(NULL, "|", &p); _cs = atoi(params); params = strtok_r(NULL, "|", &p); _dc = atoi(params); diff --git a/README.md b/README.md index 4c40008..58133ed 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,13 @@ Pico * Data: Pin 19 * CS: Pin 17 for the first display, for more choose as you want * Pin 16 can NOT be used for any other device + For both boards D/C and Reset can be choosen as you want. -For now these pins have to be defined within the connector to mark them as used. This will be changed later. +** Important Remark ** +If you have already used this before, delete your config from the board before updating! +Once you have updated your board configure the display agin. CLK and Data pins must not be configured anymore as they are fixed (as before). +Also make sure to use the updated `mobiflight.gnc255.device.json` file. Connect your display accordingly the above used pins. Depending on your display, you might need to adjust some jumpers on the controller board to enable the SPI interface - below is one example of such display that works