Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpio enhancements (issue #347) #355

Merged
merged 35 commits into from
Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e6b41a3
First pass at spring-compensation
giseburt Dec 1, 2017
b44be38
Merge branch 'dev-168-gquintic' into dev-xxx-spring-comp
giseburt Dec 2, 2017
4f8aa01
Adjusting the spring factor computation and configuration
giseburt Dec 8, 2017
6006574
Removing square of error in PID to increase PID reliability.
giseburt Dec 8, 2017
7329076
Merge branch 'dev-168-gquintic' into dev-307-spring-comp
giseburt Dec 8, 2017
01d3973
Reforctor of GPIO in prep of adding `ain`N and `ts`N (temperature sen…
giseburt Dec 13, 2017
7ee5850
Fixing GPIO bugs from last commit.
giseburt Dec 13, 2017
cebdab7
Update reference to Motate for SamS70 fixes
giseburt Feb 19, 2018
7dc5b96
Adjusted for latest Motate changes to SamS70 USB
giseburt Feb 19, 2018
70a3f30
Major GOIO refactor
giseburt Feb 19, 2018
193493b
Finish support for gQuintic rev D
giseburt Feb 19, 2018
c827075
Adding support for SMW3D R7 and Pendulum v2
giseburt Feb 19, 2018
3e8f443
Adjustments to Ultimaker_2_Plus
giseburt Feb 19, 2018
5ed86f8
First pass at making outN and inN configured by doutNout and dinNin r…
giseburt Feb 27, 2018
4a86b9d
Fixing gQuintic gpio configuration for new settings
giseburt Feb 27, 2018
865dd56
Add gQuadratic rev C (need to fix motors still)
giseburt Feb 27, 2018
10f69bd
Finishing touches on the qQuadratic board files (fixes to pinouts on …
giseburt Mar 1, 2018
1c35c92
Update reference to new Motate (fixes to SPI)
giseburt Mar 1, 2018
9817e0b
Finishing fixes for gQuadratic rev C
giseburt Mar 4, 2018
23194e9
Initial GPIO action refactor (incomplete)
giseburt Mar 4, 2018
02ef06a
Fix default settings.
giseburt Mar 4, 2018
9b46efb
Fix Axidraw settings
giseburt Mar 4, 2018
b833230
Finsihed adding reset, limit, and interlock event handlers
giseburt Mar 4, 2018
8a07cee
Renaming "Listener" to "Handler"
giseburt Mar 4, 2018
f2f42a3
Name collision fix with "_handler" and some code rarrangement.
giseburt Mar 4, 2018
29db380
Updated Motate reference for SamS70 USB fixes
giseburt Mar 5, 2018
f41ec45
Adjust analog inputs: cache computed value, and default to lowest res…
giseburt Mar 26, 2018
f9ac1c7
Remove leftover ifdefs
giseburt Mar 26, 2018
79a5788
Remove spring offset code
giseburt Mar 26, 2018
71e0400
Minor adjustments to GPIO
giseburt Mar 28, 2018
fc93693
gpioDigitalOutputReader -> gpioDigitalOutputWriter, and 16 instead of 14
giseburt Mar 28, 2018
57b34d1
`inM` and `outM` go to `M`=16, `ainN`->`aiN`, added `ainM`, added `ai…
giseburt Mar 29, 2018
150e322
Added `aiNain` to expose the analog pins on `ainM`
giseburt Mar 29, 2018
fed9c9e
Fixes for GPIO proxies
giseburt May 6, 2018
fbad7f5
Made svb300 compile
giseburt Jun 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
108 changes: 108 additions & 0 deletions g2core/board/Archim/board_gpio.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* gpio.cpp - digital IO handling functions
* This file is part of the g2core project
*
* Copyright (c) 2015 - 2107 Alden S. Hart, Jr.
* Copyright (c) 2015 - 2017 Robert Giseburt
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Switch Modes
*
* The switches are considered to be homing switches when cycle_state is
* CYCLE_HOMING. At all other times they are treated as limit switches:
* - Hitting a homing switch puts the current move into feedhold
* - Hitting a limit switch causes the machine to shut down and go into lockdown until reset
*
* The normally open switch modes (NO) trigger an interrupt on the falling edge
* and lockout subsequent interrupts for the defined lockout period. This approach
* beats doing debouncing as an integration as switches fire immediately.
*
* The normally closed switch modes (NC) trigger an interrupt on the rising edge
* and lockout subsequent interrupts for the defined lockout period. Ditto on the method.
*/

#include "../../g2core.h" // #1
#include "config.h" // #2
#include "gpio.h"
#include "hardware.h"
#include "canonical_machine.h"

#include "text_parser.h"
#include "controller.h"
#include "util.h"
#include "report.h"
#include "xio.h"

#include "MotateTimers.h"

/**** Setup Actual Objects ****/

gpioDigitalInputPin<IRQPin<Motate::kInput1_PinNumber>> din1 {DI1_MODE, 1};
gpioDigitalInputPin<IRQPin<Motate::kInput2_PinNumber>> din2 {DI2_MODE, 2};
gpioDigitalInputPin<IRQPin<Motate::kInput3_PinNumber>> din3 {DI3_MODE, 3};
gpioDigitalInputPin<IRQPin<Motate::kInput4_PinNumber>> din4 {DI4_MODE, 4};
gpioDigitalInputPin<IRQPin<Motate::kInput5_PinNumber>> din5 {DI5_MODE, 5};
gpioDigitalInputPin<IRQPin<Motate::kInput6_PinNumber>> din6 {DI6_MODE, 6};
gpioDigitalInputPin<IRQPin<Motate::kInput7_PinNumber>> din7 {DI7_MODE, 7};
gpioDigitalInputPin<IRQPin<Motate::kInput8_PinNumber>> din8 {DI8_MODE, 8};
gpioDigitalInputPin<IRQPin<Motate::kInput9_PinNumber>> din9 {DI9_MODE, 9};
// gpioDigitalInputPin<IRQPin<Motate::kInput10_PinNumber>> din10 {DI10_MODE, 10};
// gpioDigitalInputPin<IRQPin<Motate::kInput11_PinNumber>> din11 {DI11_MODE, 11};
// gpioDigitalInputPin<IRQPin<Motate::kInput12_PinNumber>> din12 {DI12_MODE, 12};

gpioDigitalOutputPin<OutputType<OUTPUT1_PWM, Motate::kOutput1_PinNumber>> dout1 { DO1_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT2_PWM, Motate::kOutput2_PinNumber>> dout2 { DO2_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT3_PWM, Motate::kOutput3_PinNumber>> dout3 { DO3_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT4_PWM, Motate::kOutput4_PinNumber>> dout4 { DO4_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT5_PWM, Motate::kOutput5_PinNumber>> dout5 { DO5_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT6_PWM, Motate::kOutput6_PinNumber>> dout6 { DO6_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT7_PWM, Motate::kOutput7_PinNumber>> dout7 { DO7_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT8_PWM, Motate::kOutput8_PinNumber>> dout8 { DO8_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT9_PWM, Motate::kOutput9_PinNumber>> dout9 { DO9_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT10_PWM, Motate::kOutput10_PinNumber>> dout10 { DO10_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT11_PWM, Motate::kOutput11_PinNumber>> dout11 { DO11_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT12_PWM, Motate::kOutput12_PinNumber>> dout12 { DO12_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT13_PWM, Motate::kOutput13_PinNumber>> dout13 { DO13_MODE, (uint32_t)200000 };

/**** Setup Arrays - these are extern and MUST match the board_gpio.h ****/

gpioDigitalInput* const d_in[] = {&din1, &din2, &din3, &din4, &din5, &din6, &din7, &din8, &din9};
gpioDigitalOutput* const d_out[] = {&dout1, &dout2, &dout3, &dout4, &dout5, &dout6, &dout7, &dout8, &dout9, &dout10, &dout11, &dout12, &dout13};
// not yet used
// gpioAnalogInput* a_in[A_IN_CHANNELS];
// gpioAnalogOutput* a_out[A_OUT_CHANNELS];

/************************************************************************************
**** CODE **************************************************************************
************************************************************************************/
/*
* gpio_reset() - reset inputs and outputs (no initialization)
*/


void outputs_reset(void) {
// nothing to do
}

void inputs_reset(void) {
// nothing to do
}
90 changes: 90 additions & 0 deletions g2core/board/Archim/board_gpio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* gpio.h - Digital IO handling functions
* This file is part of the g2core project
*
* Copyright (c) 2015 - 2017 Alden S. Hart, Jr.
* Copyright (c) 2015 - 2017 Robert Giseburt
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef BOARD_GPIO_H_ONCE
#define BOARD_GPIO_H_ONCE

// this file is included from the bottom of gpio.h, but we do this for completeness
#include "../../gpio.h"

/*
* GPIO defines
*/
//--- change as required for board and switch hardware ---//

#define D_IN_CHANNELS 9 // v9 // number of digital inputs supported
#define D_OUT_CHANNELS 13 // number of digital outputs supported
#define A_IN_CHANNELS 0 // number of analog inputs supported
#define A_OUT_CHANNELS 0 // number of analog outputs supported

#define INPUT_LOCKOUT_MS 10 // milliseconds to go dead after input firing

/*
* The GPIO objects themselves - this must match up with board_gpio.cpp!
*/

extern gpioDigitalInput* const d_in[D_IN_CHANNELS];
extern gpioDigitalOutput* const d_out[D_OUT_CHANNELS];
// extern gpioAnalogInput* a_in[A_IN_CHANNELS];
// extern gpioAnalogOutput* a_out[A_OUT_CHANNELS];

// prepare the objects as externs (for config_app to not bloat)
using Motate::IRQPin;
using Motate::PWMOutputPin;
using Motate::PWMLikeOutputPin;
template<bool can_pwm, pin_number... V>
using OutputType = typename std::conditional<can_pwm, PWMOutputPin<V...>, PWMLikeOutputPin<V...>>::type;

extern gpioDigitalInputPin<IRQPin<Motate::kInput1_PinNumber>> din1;
extern gpioDigitalInputPin<IRQPin<Motate::kInput2_PinNumber>> din2;
extern gpioDigitalInputPin<IRQPin<Motate::kInput3_PinNumber>> din3;
extern gpioDigitalInputPin<IRQPin<Motate::kInput4_PinNumber>> din4;
extern gpioDigitalInputPin<IRQPin<Motate::kInput5_PinNumber>> din5;
extern gpioDigitalInputPin<IRQPin<Motate::kInput6_PinNumber>> din6;
extern gpioDigitalInputPin<IRQPin<Motate::kInput7_PinNumber>> din7;
extern gpioDigitalInputPin<IRQPin<Motate::kInput8_PinNumber>> din8;
extern gpioDigitalInputPin<IRQPin<Motate::kInput9_PinNumber>> din9;
// extern gpioDigitalInputPin<IRQPin<Motate::kInput10_PinNumber>> din10;
// extern gpioDigitalInputPin<IRQPin<Motate::kInput11_PinNumber>> din11;
// extern gpioDigitalInputPin<IRQPin<Motate::kInput12_PinNumber>> din12;

extern gpioDigitalOutputPin<OutputType<OUTPUT1_PWM, Motate::kOutput1_PinNumber>> dout1;
extern gpioDigitalOutputPin<OutputType<OUTPUT2_PWM, Motate::kOutput2_PinNumber>> dout2;
extern gpioDigitalOutputPin<OutputType<OUTPUT3_PWM, Motate::kOutput3_PinNumber>> dout3;
extern gpioDigitalOutputPin<OutputType<OUTPUT4_PWM, Motate::kOutput4_PinNumber>> dout4;
extern gpioDigitalOutputPin<OutputType<OUTPUT5_PWM, Motate::kOutput5_PinNumber>> dout5;
extern gpioDigitalOutputPin<OutputType<OUTPUT6_PWM, Motate::kOutput6_PinNumber>> dout6;
extern gpioDigitalOutputPin<OutputType<OUTPUT7_PWM, Motate::kOutput7_PinNumber>> dout7;
extern gpioDigitalOutputPin<OutputType<OUTPUT8_PWM, Motate::kOutput8_PinNumber>> dout8;
extern gpioDigitalOutputPin<OutputType<OUTPUT9_PWM, Motate::kOutput9_PinNumber>> dout9;
extern gpioDigitalOutputPin<OutputType<OUTPUT10_PWM, Motate::kOutput10_PinNumber>> dout10;
extern gpioDigitalOutputPin<OutputType<OUTPUT11_PWM, Motate::kOutput11_PinNumber>> dout11;
extern gpioDigitalOutputPin<OutputType<OUTPUT12_PWM, Motate::kOutput12_PinNumber>> dout12;
extern gpioDigitalOutputPin<OutputType<OUTPUT13_PWM, Motate::kOutput13_PinNumber>> dout13;


#endif // End of include guard: BOARD_GPIO_H_ONCE
4 changes: 2 additions & 2 deletions g2core/board/Archim/board_xio.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
#include "MotateUSBCDC.h"

#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
typedef Motate::USBDevice< USBDeviceHardware, Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
typedef Motate::USBDevice< USBDeviceHardware, Motate::USBCDC, Motate::USBCDC > XIOUSBDevice_t;
#endif

extern XIOUSBDevice_t usb;
Expand Down
108 changes: 108 additions & 0 deletions g2core/board/ArduinoDue/board_gpio.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* gpio.cpp - digital IO handling functions
* This file is part of the g2core project
*
* Copyright (c) 2015 - 2107 Alden S. Hart, Jr.
* Copyright (c) 2015 - 2017 Robert Giseburt
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Switch Modes
*
* The switches are considered to be homing switches when cycle_state is
* CYCLE_HOMING. At all other times they are treated as limit switches:
* - Hitting a homing switch puts the current move into feedhold
* - Hitting a limit switch causes the machine to shut down and go into lockdown until reset
*
* The normally open switch modes (NO) trigger an interrupt on the falling edge
* and lockout subsequent interrupts for the defined lockout period. This approach
* beats doing debouncing as an integration as switches fire immediately.
*
* The normally closed switch modes (NC) trigger an interrupt on the rising edge
* and lockout subsequent interrupts for the defined lockout period. Ditto on the method.
*/

#include "../../g2core.h" // #1
#include "config.h" // #2
#include "gpio.h"
#include "hardware.h"
#include "canonical_machine.h"

#include "text_parser.h"
#include "controller.h"
#include "util.h"
#include "report.h"
#include "xio.h"

#include "MotateTimers.h"

/**** Setup Actual Objects ****/

gpioDigitalInputPin<IRQPin<Motate::kInput1_PinNumber>> din1 {DI1_MODE, 1};
gpioDigitalInputPin<IRQPin<Motate::kInput2_PinNumber>> din2 {DI2_MODE, 2};
gpioDigitalInputPin<IRQPin<Motate::kInput3_PinNumber>> din3 {DI3_MODE, 3};
gpioDigitalInputPin<IRQPin<Motate::kInput4_PinNumber>> din4 {DI4_MODE, 4};
gpioDigitalInputPin<IRQPin<Motate::kInput5_PinNumber>> din5 {DI5_MODE, 5};
gpioDigitalInputPin<IRQPin<Motate::kInput6_PinNumber>> din6 {DI6_MODE, 6};
gpioDigitalInputPin<IRQPin<Motate::kInput7_PinNumber>> din7 {DI7_MODE, 7};
gpioDigitalInputPin<IRQPin<Motate::kInput8_PinNumber>> din8 {DI8_MODE, 8};
gpioDigitalInputPin<IRQPin<Motate::kInput9_PinNumber>> din9 {DI9_MODE, 9};
// gpioDigitalInputPin<IRQPin<Motate::kInput10_PinNumber>> din10 {DI10_MODE, 10};
// gpioDigitalInputPin<IRQPin<Motate::kInput11_PinNumber>> din11 {DI11_MODE, 11};
// gpioDigitalInputPin<IRQPin<Motate::kInput12_PinNumber>> din12 {DI12_MODE, 12};

gpioDigitalOutputPin<OutputType<OUTPUT1_PWM, Motate::kOutput1_PinNumber>> dout1 { DO1_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT2_PWM, Motate::kOutput2_PinNumber>> dout2 { DO2_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT3_PWM, Motate::kOutput3_PinNumber>> dout3 { DO3_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT4_PWM, Motate::kOutput4_PinNumber>> dout4 { DO4_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT5_PWM, Motate::kOutput5_PinNumber>> dout5 { DO5_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT6_PWM, Motate::kOutput6_PinNumber>> dout6 { DO6_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT7_PWM, Motate::kOutput7_PinNumber>> dout7 { DO7_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT8_PWM, Motate::kOutput8_PinNumber>> dout8 { DO8_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT9_PWM, Motate::kOutput9_PinNumber>> dout9 { DO9_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT10_PWM, Motate::kOutput10_PinNumber>> dout10 { DO10_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT11_PWM, Motate::kOutput11_PinNumber>> dout11 { DO11_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT12_PWM, Motate::kOutput12_PinNumber>> dout12 { DO12_MODE, (uint32_t)200000 };
gpioDigitalOutputPin<OutputType<OUTPUT13_PWM, Motate::kOutput13_PinNumber>> dout13 { DO13_MODE, (uint32_t)200000 };

/**** Setup Arrays - these are extern and MUST match the board_gpio.h ****/

gpioDigitalInput* const d_in[] = {&din1, &din2, &din3, &din4, &din5, &din6, &din7, &din8, &din9};
gpioDigitalOutput* const d_out[] = {&dout1, &dout2, &dout3, &dout4, &dout5, &dout6, &dout7, &dout8, &dout9, &dout10, &dout11, &dout12, &dout13};
// not yet used
// gpioAnalogInput* a_in[A_IN_CHANNELS];
// gpioAnalogOutput* a_out[A_OUT_CHANNELS];

/************************************************************************************
**** CODE **************************************************************************
************************************************************************************/
/*
* gpio_reset() - reset inputs and outputs (no initialization)
*/


void outputs_reset(void) {
// nothing to do
}

void inputs_reset(void) {
// nothing to do
}
Loading