From 0579ecd406a6410cb40744f32e43829294c8d786 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:01:25 +1000 Subject: [PATCH 1/8] initial commit --- boards/robohatmm1/board_config.h | 79 +++++++++++++++++--------------- source/AOTimer.cpp | 4 +- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index 28433d62..5f4cc58c 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -50,6 +50,7 @@ #define CONFIG_ADC_INPUT_6 0 // not used #define CONFIG_ADC_INPUT_7 0 // not used + //we will override some of the default ADC pins for this board //#define CONFIG_ADC_INPUT_0 1 //#define CONFIG_ADC_INPUT_0_PIN 7 //PA07 - RCH_1 @@ -78,17 +79,21 @@ //* ============== TOUCH =================== *// #define CONFIG_TOUCH 1 -#ifndef ENABLE_LOGGING -#define CONFIG_TOUCH0 1 //this is the UART log pin -#endif +#define CONFIG_TOUCH0 1 #define CONFIG_TOUCH0_PIN 7 + #define CONFIG_TOUCH1 1 #define CONFIG_TOUCH1_PIN 6 + #define CONFIG_TOUCH2 1 #define CONFIG_TOUCH2_PIN 5 -#define CONFIG_TOUCH3 1 + +#ifndef ENABLE_LOGGING +#define CONFIG_TOUCH3 1 //this is the UART log pin +#endif #define CONFIG_TOUCH3_PIN 4 + //* ============== TIMER =================== *// #define CONFIG_TIMER 1 @@ -96,57 +101,56 @@ #define CONFIG_TIMER_PWM_OUT0 1 #define CONFIG_TIMER_PWM_OUT0_IS_TCC #define CONFIG_TIMER_PWM_OUT0_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT0_TCC TCC2 +#define CONFIG_TIMER_PWM_OUT0_TCC TCC0 #define CONFIG_TIMER_PWM_OUT0_WO 0 -#define CONFIG_TIMER_PWM_OUT0_PIN 16 //PA16 - SERVO_01 +#define CONFIG_TIMER_PWM_OUT0_PIN 8 //PA08 - SERVO_08 #define CONFIG_TIMER_PWM_OUT1 1 #define CONFIG_TIMER_PWM_OUT1_IS_TCC #define CONFIG_TIMER_PWM_OUT1_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT1_TCC TCC2 +#define CONFIG_TIMER_PWM_OUT1_TCC TCC0 #define CONFIG_TIMER_PWM_OUT1_WO 1 -#define CONFIG_TIMER_PWM_OUT1_PIN 17 //PA17 - SERVO_02 +#define CONFIG_TIMER_PWM_OUT1_PIN 9 //PA09 - SERVO_07 #define CONFIG_TIMER_PWM_OUT2 1 -#define CONFIG_TIMER_PWM_OUT2_TCC NOT_ON_TCC -#define CONFIG_TIMER_PWM_OUT2_TC TC3 -#define CONFIG_TIMER_PWM_OUT2_WO 0 -#define CONFIG_TIMER_PWM_OUT2_PIN 18 //PA18 - SERVO_03 (alt TC3[0]) +#define CONFIG_TIMER_PWM_OUT2_IS_TCC +#define CONFIG_TIMER_PWM_OUT2_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT2_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT2_WO 2 +#define CONFIG_TIMER_PWM_OUT2_PIN 10 //PA10 - SERVO_06 (alt TCC0[2]) #define CONFIG_TIMER_PWM_OUT3 1 -#define CONFIG_TIMER_PWM_OUT3_TCC NOT_ON_TCC -#define CONFIG_TIMER_PWM_OUT3_TC TC3 -#define CONFIG_TIMER_PWM_OUT3_WO 1 -#define CONFIG_TIMER_PWM_OUT3_PIN 19 //PA19 - SERVO_04 (alt TC3[1]) +#define CONFIG_TIMER_PWM_OUT3_IS_TCC +#define CONFIG_TIMER_PWM_OUT3_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT3_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT3_WO 3 +#define CONFIG_TIMER_PWM_OUT3_PIN 11 //PA11 - SERVO_05 (alt TCC0[3]) #define CONFIG_TIMER_PWM_OUT4 1 #define CONFIG_TIMER_PWM_OUT4_IS_TCC #define CONFIG_TIMER_PWM_OUT4_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT4_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT4_WO 3 -#define CONFIG_TIMER_PWM_OUT4_PIN 11 //PA11 - SERVO_05 (alt TCC0[3]) +#define CONFIG_TIMER_PWM_OUT4_TCC TCC2 +#define CONFIG_TIMER_PWM_OUT4_WO 0 +#define CONFIG_TIMER_PWM_OUT4_PIN 16 //PA16 - SERVO_01 #define CONFIG_TIMER_PWM_OUT5 1 #define CONFIG_TIMER_PWM_OUT5_IS_TCC #define CONFIG_TIMER_PWM_OUT5_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT5_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT5_WO 2 -#define CONFIG_TIMER_PWM_OUT5_PIN 10 //PA10 - SERVO_06 (alt TCC0[2]) +#define CONFIG_TIMER_PWM_OUT5_TCC TCC2 +#define CONFIG_TIMER_PWM_OUT5_WO 1 +#define CONFIG_TIMER_PWM_OUT5_PIN 17 //PA17 - SERVO_02 #define CONFIG_TIMER_PWM_OUT6 1 -#define CONFIG_TIMER_PWM_OUT6_IS_TCC -#define CONFIG_TIMER_PWM_OUT6_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT6_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT6_WO 1 -#define CONFIG_TIMER_PWM_OUT6_PIN 9 //PA09 - SERVO_07 +#define CONFIG_TIMER_PWM_OUT6_TCC NOT_ON_TCC +#define CONFIG_TIMER_PWM_OUT6_TC TC3 +#define CONFIG_TIMER_PWM_OUT6_WO 0 +#define CONFIG_TIMER_PWM_OUT6_PIN 18 //PA18 - SERVO_03 (alt TC3[0]) #define CONFIG_TIMER_PWM_OUT7 1 -#define CONFIG_TIMER_PWM_OUT7_IS_TCC -#define CONFIG_TIMER_PWM_OUT7_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT7_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT7_WO 0 -#define CONFIG_TIMER_PWM_OUT7_PIN 8 //PA08 - SERVO_08 - +#define CONFIG_TIMER_PWM_OUT7_TCC NOT_ON_TCC +#define CONFIG_TIMER_PWM_OUT7_TC TC3 +#define CONFIG_TIMER_PWM_OUT7_WO 1 +#define CONFIG_TIMER_PWM_OUT7_PIN 19 //PA19 - SERVO_04 (alt TC3[1]) // // Some pins support PWM and Analog, but not at the same time. @@ -179,7 +183,7 @@ //* ============== INTERRUPT =================== *// #define CONFIG_INTERRUPT 0 -//#define CONFIG_INTERRUPT_PIN 8 +#define CONFIG_INTERRUPT_PIN 8 //* ============== I2C SLAVE =================== *// #define CONFIG_I2C_SLAVE 1 @@ -189,7 +193,7 @@ #define CONFIG_I2C_SLAVE_PIN_SDA 22 #define CONFIG_I2C_SLAVE_PIN_SCL 23 #define CONFIG_I2C_SLAVE_MUX 2 -#define CONFIG_I2C_SLAVE_FLOW_CONTROL 1 +#define CONFIG_I2C_SLAVE_FLOW_CONTROL 0 //#define CONFIG_I2C_SLAVE_FLOW_CONTROL_PIN 23 #define CONFIG_I2C_SLAVE_ADDR 0x49 @@ -234,12 +238,15 @@ #define CONFIG_SERCOM_UART_MUX_RX 3 +//* ============== ENCODER =================== *// +#define CONFIG_ENCODER 0 + //* ============== DAP =================== *// #define CONFIG_DAP 0 //* =========== NEOPIXEL ================ *// #define CONFIG_NEOPIXEL 1 -#define CONFIG_NEOPIXEL_BUF_MAX 1024 +#define CONFIG_NEOPIXEL_BUF_MAX 512 //* =========== POWER SENSE ================ *// #define CONFIG_POWER_SENSE 0 diff --git a/source/AOTimer.cpp b/source/AOTimer.cpp index 8776cfba..b451976c 100644 --- a/source/AOTimer.cpp +++ b/source/AOTimer.cpp @@ -115,7 +115,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT0 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT0_IS_TCC - if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2 || CONFIG_TIMER_PWM_OUT0_TCC == TCC0) pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 5); @@ -134,7 +134,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT1 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT1_IS_TCC - if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2 || CONFIG_TIMER_PWM_OUT1_TCC == TCC0) pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 5); From aabbe19a4847f01f2a65a8d0597673070ca8e49f Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:06:34 +1000 Subject: [PATCH 2/8] added in new variable to AOTimer.cpp to ensure correct timer function choosen. --- source/AOTimer.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/source/AOTimer.cpp b/source/AOTimer.cpp index b451976c..c00dd8b6 100644 --- a/source/AOTimer.cpp +++ b/source/AOTimer.cpp @@ -115,7 +115,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT0 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT0_IS_TCC - if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2 || CONFIG_TIMER_PWM_OUT0_TCC == TCC0) + if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2 || CONFIG_TIMER_PWM_OUT0_FUNC == E) pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 5); @@ -134,7 +134,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT1 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT1_IS_TCC - if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2 || CONFIG_TIMER_PWM_OUT1_TCC == TCC0) + if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2 || CONFIG_TIMER_PWM_OUT1_FUNC == E) pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 5); @@ -153,7 +153,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT2 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT2_IS_TCC - if(CONFIG_TIMER_PWM_OUT2_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT2_TCC == TCC2 || CONFIG_TIMER_PWM_OUT2_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT2_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT2_PIN, 5); @@ -172,7 +172,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT3 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT3_IS_TCC - if(CONFIG_TIMER_PWM_OUT3_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT3_TCC == TCC2 || CONFIG_TIMER_PWM_OUT3_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT3_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT3_PIN, 5); @@ -191,7 +191,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT4 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT4_IS_TCC - if(CONFIG_TIMER_PWM_OUT4_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT4_TCC == TCC2 || CONFIG_TIMER_PWM_OUT4_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT4_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT4_PIN, 5); @@ -210,7 +210,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT5 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT5_IS_TCC - if(CONFIG_TIMER_PWM_OUT5_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT5_TCC == TCC2 || CONFIG_TIMER_PWM_OUT5_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT5_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT5_PIN, 5); @@ -229,7 +229,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT6 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT6_IS_TCC - if(CONFIG_TIMER_PWM_OUT6_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT6_TCC == TCC2 || CONFIG_TIMER_PWM_OUT6_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT6_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT6_PIN, 5); @@ -248,7 +248,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT7 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT7_IS_TCC - if(CONFIG_TIMER_PWM_OUT7_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT7_TCC == TCC2 || CONFIG_TIMER_PWM_OUT7_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT7_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT7_PIN, 5); @@ -267,7 +267,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT8 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT8_IS_TCC - if(CONFIG_TIMER_PWM_OUT8_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT8_TCC == TCC2 || CONFIG_TIMER_PWM_OUT8_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT8_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT8_PIN, 5); @@ -286,7 +286,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT9 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT9_IS_TCC - if(CONFIG_TIMER_PWM_OUT9_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT9_TCC == TCC2 || CONFIG_TIMER_PWM_OUT9_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT9_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT9_PIN, 5); @@ -305,7 +305,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT10 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT10_IS_TCC - if(CONFIG_TIMER_PWM_OUT10_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT10_TCC == TCC2 || CONFIG_TIMER_PWM_OUT10_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT10_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT10_PIN, 5); @@ -324,7 +324,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT11 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT11_IS_TCC - if(CONFIG_TIMER_PWM_OUT11_TCC == TCC2) + if(CONFIG_TIMER_PWM_OUT11_TCC == TCC2 || CONFIG_TIMER_PWM_OUT11_FUNC == E)) pinPeripheral(CONFIG_TIMER_PWM_OUT11_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT11_PIN, 5); From dde6d914637ec70d9b6f8acd150e5111fdfc9a84 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:13:24 +1000 Subject: [PATCH 3/8] updated the SeeSawConfig.h master header file --- boards/robohatmm1/board_config.h | 8 ++--- include/SeesawConfig.h | 50 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index 5f4cc58c..631a0ba1 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -43,10 +43,10 @@ #define CONFIG_ADC_INPUT_1_PIN (32 + 3) // PB03 - GPS_RX #define CONFIG_ADC_INPUT_1_CHANNEL 11 -#define CONFIG_ADC_INPUT_2 0 // not used -#define CONFIG_ADC_INPUT_3 0 // not used -#define CONFIG_ADC_INPUT_4 0 // not used -#define CONFIG_ADC_INPUT_5 0 // not used +//#define CONFIG_ADC_INPUT_2 0 // not used +//#define CONFIG_ADC_INPUT_3 0 // not used +//#define CONFIG_ADC_INPUT_4 0 // not used +//#define CONFIG_ADC_INPUT_5 0 // not used #define CONFIG_ADC_INPUT_6 0 // not used #define CONFIG_ADC_INPUT_7 0 // not used diff --git a/include/SeesawConfig.h b/include/SeesawConfig.h index 3b76b043..19dfc397 100644 --- a/include/SeesawConfig.h +++ b/include/SeesawConfig.h @@ -282,6 +282,56 @@ #define CONFIG_TIMER_PWM_OUT11_PIN 0 #endif +#ifdef USE_TCC_TIMERS +#ifndef CONFIG_TIMER_PWM_OUT0_FUNC +#define CONFIG_TIMER_PWM_OUT0_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT1_FUNC +#define CONFIG_TIMER_PWM_OUT1_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT2_FUNC +#define CONFIG_TIMER_PWM_OUT2_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT3_FUNC +#define CONFIG_TIMER_PWM_OUT3_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT4_FUNC +#define CONFIG_TIMER_PWM_OUT4_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT5_FUNC +#define CONFIG_TIMER_PWM_OUT5_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT6_FUNC +#define CONFIG_TIMER_PWM_OUT6_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT7_FUNC +#define CONFIG_TIMER_PWM_OUT7_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT8_FUNC +#define CONFIG_TIMER_PWM_OUT8_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT9_FUNC +#define CONFIG_TIMER_PWM_OUT9_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT10_FUNC +#define CONFIG_TIMER_PWM_OUT10_FUNC F +#endif + +#ifndef CONFIG_TIMER_PWM_OUT11_FUNC +#define CONFIG_TIMER_PWM_OUT11_FUNC F +#endif +#endif // USE_TCC_TIMERS + #if CONFIG_TIMER typedef struct _PWM { From 493dd4da688816ec79155d6f5552b2abc454b031 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:17:59 +1000 Subject: [PATCH 4/8] put robothatmm1/board_config.h back to known working one. --- boards/robohatmm1/board_config.h | 87 +++++++++++++++----------------- 1 file changed, 40 insertions(+), 47 deletions(-) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index 631a0ba1..28433d62 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -43,14 +43,13 @@ #define CONFIG_ADC_INPUT_1_PIN (32 + 3) // PB03 - GPS_RX #define CONFIG_ADC_INPUT_1_CHANNEL 11 -//#define CONFIG_ADC_INPUT_2 0 // not used -//#define CONFIG_ADC_INPUT_3 0 // not used -//#define CONFIG_ADC_INPUT_4 0 // not used -//#define CONFIG_ADC_INPUT_5 0 // not used +#define CONFIG_ADC_INPUT_2 0 // not used +#define CONFIG_ADC_INPUT_3 0 // not used +#define CONFIG_ADC_INPUT_4 0 // not used +#define CONFIG_ADC_INPUT_5 0 // not used #define CONFIG_ADC_INPUT_6 0 // not used #define CONFIG_ADC_INPUT_7 0 // not used - //we will override some of the default ADC pins for this board //#define CONFIG_ADC_INPUT_0 1 //#define CONFIG_ADC_INPUT_0_PIN 7 //PA07 - RCH_1 @@ -79,21 +78,17 @@ //* ============== TOUCH =================== *// #define CONFIG_TOUCH 1 -#define CONFIG_TOUCH0 1 +#ifndef ENABLE_LOGGING +#define CONFIG_TOUCH0 1 //this is the UART log pin +#endif #define CONFIG_TOUCH0_PIN 7 - #define CONFIG_TOUCH1 1 #define CONFIG_TOUCH1_PIN 6 - #define CONFIG_TOUCH2 1 #define CONFIG_TOUCH2_PIN 5 - -#ifndef ENABLE_LOGGING -#define CONFIG_TOUCH3 1 //this is the UART log pin -#endif +#define CONFIG_TOUCH3 1 #define CONFIG_TOUCH3_PIN 4 - //* ============== TIMER =================== *// #define CONFIG_TIMER 1 @@ -101,56 +96,57 @@ #define CONFIG_TIMER_PWM_OUT0 1 #define CONFIG_TIMER_PWM_OUT0_IS_TCC #define CONFIG_TIMER_PWM_OUT0_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT0_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT0_TCC TCC2 #define CONFIG_TIMER_PWM_OUT0_WO 0 -#define CONFIG_TIMER_PWM_OUT0_PIN 8 //PA08 - SERVO_08 +#define CONFIG_TIMER_PWM_OUT0_PIN 16 //PA16 - SERVO_01 #define CONFIG_TIMER_PWM_OUT1 1 #define CONFIG_TIMER_PWM_OUT1_IS_TCC #define CONFIG_TIMER_PWM_OUT1_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT1_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT1_TCC TCC2 #define CONFIG_TIMER_PWM_OUT1_WO 1 -#define CONFIG_TIMER_PWM_OUT1_PIN 9 //PA09 - SERVO_07 +#define CONFIG_TIMER_PWM_OUT1_PIN 17 //PA17 - SERVO_02 #define CONFIG_TIMER_PWM_OUT2 1 -#define CONFIG_TIMER_PWM_OUT2_IS_TCC -#define CONFIG_TIMER_PWM_OUT2_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT2_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT2_WO 2 -#define CONFIG_TIMER_PWM_OUT2_PIN 10 //PA10 - SERVO_06 (alt TCC0[2]) +#define CONFIG_TIMER_PWM_OUT2_TCC NOT_ON_TCC +#define CONFIG_TIMER_PWM_OUT2_TC TC3 +#define CONFIG_TIMER_PWM_OUT2_WO 0 +#define CONFIG_TIMER_PWM_OUT2_PIN 18 //PA18 - SERVO_03 (alt TC3[0]) #define CONFIG_TIMER_PWM_OUT3 1 -#define CONFIG_TIMER_PWM_OUT3_IS_TCC -#define CONFIG_TIMER_PWM_OUT3_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT3_TCC TCC0 -#define CONFIG_TIMER_PWM_OUT3_WO 3 -#define CONFIG_TIMER_PWM_OUT3_PIN 11 //PA11 - SERVO_05 (alt TCC0[3]) +#define CONFIG_TIMER_PWM_OUT3_TCC NOT_ON_TCC +#define CONFIG_TIMER_PWM_OUT3_TC TC3 +#define CONFIG_TIMER_PWM_OUT3_WO 1 +#define CONFIG_TIMER_PWM_OUT3_PIN 19 //PA19 - SERVO_04 (alt TC3[1]) #define CONFIG_TIMER_PWM_OUT4 1 #define CONFIG_TIMER_PWM_OUT4_IS_TCC #define CONFIG_TIMER_PWM_OUT4_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT4_TCC TCC2 -#define CONFIG_TIMER_PWM_OUT4_WO 0 -#define CONFIG_TIMER_PWM_OUT4_PIN 16 //PA16 - SERVO_01 +#define CONFIG_TIMER_PWM_OUT4_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT4_WO 3 +#define CONFIG_TIMER_PWM_OUT4_PIN 11 //PA11 - SERVO_05 (alt TCC0[3]) #define CONFIG_TIMER_PWM_OUT5 1 #define CONFIG_TIMER_PWM_OUT5_IS_TCC #define CONFIG_TIMER_PWM_OUT5_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT5_TCC TCC2 -#define CONFIG_TIMER_PWM_OUT5_WO 1 -#define CONFIG_TIMER_PWM_OUT5_PIN 17 //PA17 - SERVO_02 +#define CONFIG_TIMER_PWM_OUT5_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT5_WO 2 +#define CONFIG_TIMER_PWM_OUT5_PIN 10 //PA10 - SERVO_06 (alt TCC0[2]) #define CONFIG_TIMER_PWM_OUT6 1 -#define CONFIG_TIMER_PWM_OUT6_TCC NOT_ON_TCC -#define CONFIG_TIMER_PWM_OUT6_TC TC3 -#define CONFIG_TIMER_PWM_OUT6_WO 0 -#define CONFIG_TIMER_PWM_OUT6_PIN 18 //PA18 - SERVO_03 (alt TC3[0]) +#define CONFIG_TIMER_PWM_OUT6_IS_TCC +#define CONFIG_TIMER_PWM_OUT6_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT6_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT6_WO 1 +#define CONFIG_TIMER_PWM_OUT6_PIN 9 //PA09 - SERVO_07 #define CONFIG_TIMER_PWM_OUT7 1 -#define CONFIG_TIMER_PWM_OUT7_TCC NOT_ON_TCC -#define CONFIG_TIMER_PWM_OUT7_TC TC3 -#define CONFIG_TIMER_PWM_OUT7_WO 1 -#define CONFIG_TIMER_PWM_OUT7_PIN 19 //PA19 - SERVO_04 (alt TC3[1]) +#define CONFIG_TIMER_PWM_OUT7_IS_TCC +#define CONFIG_TIMER_PWM_OUT7_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT7_TCC TCC0 +#define CONFIG_TIMER_PWM_OUT7_WO 0 +#define CONFIG_TIMER_PWM_OUT7_PIN 8 //PA08 - SERVO_08 + // // Some pins support PWM and Analog, but not at the same time. @@ -183,7 +179,7 @@ //* ============== INTERRUPT =================== *// #define CONFIG_INTERRUPT 0 -#define CONFIG_INTERRUPT_PIN 8 +//#define CONFIG_INTERRUPT_PIN 8 //* ============== I2C SLAVE =================== *// #define CONFIG_I2C_SLAVE 1 @@ -193,7 +189,7 @@ #define CONFIG_I2C_SLAVE_PIN_SDA 22 #define CONFIG_I2C_SLAVE_PIN_SCL 23 #define CONFIG_I2C_SLAVE_MUX 2 -#define CONFIG_I2C_SLAVE_FLOW_CONTROL 0 +#define CONFIG_I2C_SLAVE_FLOW_CONTROL 1 //#define CONFIG_I2C_SLAVE_FLOW_CONTROL_PIN 23 #define CONFIG_I2C_SLAVE_ADDR 0x49 @@ -238,15 +234,12 @@ #define CONFIG_SERCOM_UART_MUX_RX 3 -//* ============== ENCODER =================== *// -#define CONFIG_ENCODER 0 - //* ============== DAP =================== *// #define CONFIG_DAP 0 //* =========== NEOPIXEL ================ *// #define CONFIG_NEOPIXEL 1 -#define CONFIG_NEOPIXEL_BUF_MAX 512 +#define CONFIG_NEOPIXEL_BUF_MAX 1024 //* =========== POWER SENSE ================ *// #define CONFIG_POWER_SENSE 0 From 607a2e5bc2df534723c6f37a5e419fc722d420d5 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:19:28 +1000 Subject: [PATCH 5/8] added in the new FUNC variable to board_config.h --- boards/robohatmm1/board_config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index 28433d62..ed78e757 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -136,6 +136,7 @@ #define CONFIG_TIMER_PWM_OUT6 1 #define CONFIG_TIMER_PWM_OUT6_IS_TCC #define CONFIG_TIMER_PWM_OUT6_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT6_FUNC E #define CONFIG_TIMER_PWM_OUT6_TCC TCC0 #define CONFIG_TIMER_PWM_OUT6_WO 1 #define CONFIG_TIMER_PWM_OUT6_PIN 9 //PA09 - SERVO_07 @@ -143,6 +144,7 @@ #define CONFIG_TIMER_PWM_OUT7 1 #define CONFIG_TIMER_PWM_OUT7_IS_TCC #define CONFIG_TIMER_PWM_OUT7_TC NOT_ON_TC +#define CONFIG_TIMER_PWM_OUT6_FUNC E #define CONFIG_TIMER_PWM_OUT7_TCC TCC0 #define CONFIG_TIMER_PWM_OUT7_WO 0 #define CONFIG_TIMER_PWM_OUT7_PIN 8 //PA08 - SERVO_08 From e7cbadf8d93660cf0328981163eba56947536d28 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:29:54 +1000 Subject: [PATCH 6/8] fixing undefined error --- include/SeesawConfig.h | 48 +++++++++++++++++++++--------------------- source/AOTimer.cpp | 24 ++++++++++----------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/SeesawConfig.h b/include/SeesawConfig.h index 19dfc397..7df5d1b7 100644 --- a/include/SeesawConfig.h +++ b/include/SeesawConfig.h @@ -283,52 +283,52 @@ #endif #ifdef USE_TCC_TIMERS -#ifndef CONFIG_TIMER_PWM_OUT0_FUNC -#define CONFIG_TIMER_PWM_OUT0_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT0_FUNC_E +#define CONFIG_TIMER_PWM_OUT0_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT1_FUNC -#define CONFIG_TIMER_PWM_OUT1_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT1_FUNC_E +#define CONFIG_TIMER_PWM_OUT1_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT2_FUNC -#define CONFIG_TIMER_PWM_OUT2_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT2_FUNC_E +#define CONFIG_TIMER_PWM_OUT2_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT3_FUNC -#define CONFIG_TIMER_PWM_OUT3_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT3_FUNC_E +#define CONFIG_TIMER_PWM_OUT3_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT4_FUNC -#define CONFIG_TIMER_PWM_OUT4_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT4_FUNC_E +#define CONFIG_TIMER_PWM_OUT4_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT5_FUNC -#define CONFIG_TIMER_PWM_OUT5_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT5_FUNC_E +#define CONFIG_TIMER_PWM_OUT5_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT6_FUNC -#define CONFIG_TIMER_PWM_OUT6_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT6_FUNC_E +#define CONFIG_TIMER_PWM_OUT6_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT7_FUNC -#define CONFIG_TIMER_PWM_OUT7_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT7_FUNC_E +#define CONFIG_TIMER_PWM_OUT7_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT8_FUNC -#define CONFIG_TIMER_PWM_OUT8_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT8_FUNC_E +#define CONFIG_TIMER_PWM_OUT8_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT9_FUNC -#define CONFIG_TIMER_PWM_OUT9_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT9_FUNC_E +#define CONFIG_TIMER_PWM_OUT9_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT10_FUNC -#define CONFIG_TIMER_PWM_OUT10_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT10_FUNC_E +#define CONFIG_TIMER_PWM_OUT10_FUNC_E 0 #endif -#ifndef CONFIG_TIMER_PWM_OUT11_FUNC -#define CONFIG_TIMER_PWM_OUT11_FUNC F +#ifndef CONFIG_TIMER_PWM_OUT11_FUNC_E +#define CONFIG_TIMER_PWM_OUT11_FUNC_E 0 #endif #endif // USE_TCC_TIMERS diff --git a/source/AOTimer.cpp b/source/AOTimer.cpp index c00dd8b6..eedf461c 100644 --- a/source/AOTimer.cpp +++ b/source/AOTimer.cpp @@ -115,7 +115,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT0 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT0_IS_TCC - if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2 || CONFIG_TIMER_PWM_OUT0_FUNC == E) + if(CONFIG_TIMER_PWM_OUT0_TCC == TCC2 || CONFIG_TIMER_PWM_OUT0_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT0_PIN, 5); @@ -134,7 +134,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT1 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT1_IS_TCC - if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2 || CONFIG_TIMER_PWM_OUT1_FUNC == E) + if(CONFIG_TIMER_PWM_OUT1_TCC == TCC2 || CONFIG_TIMER_PWM_OUT1_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT1_PIN, 5); @@ -153,7 +153,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT2 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT2_IS_TCC - if(CONFIG_TIMER_PWM_OUT2_TCC == TCC2 || CONFIG_TIMER_PWM_OUT2_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT2_TCC == TCC2 || CONFIG_TIMER_PWM_OUT2_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT2_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT2_PIN, 5); @@ -172,7 +172,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT3 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT3_IS_TCC - if(CONFIG_TIMER_PWM_OUT3_TCC == TCC2 || CONFIG_TIMER_PWM_OUT3_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT3_TCC == TCC2 || CONFIG_TIMER_PWM_OUT3_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT3_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT3_PIN, 5); @@ -191,7 +191,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT4 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT4_IS_TCC - if(CONFIG_TIMER_PWM_OUT4_TCC == TCC2 || CONFIG_TIMER_PWM_OUT4_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT4_TCC == TCC2 || CONFIG_TIMER_PWM_OUT4_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT4_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT4_PIN, 5); @@ -210,7 +210,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT5 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT5_IS_TCC - if(CONFIG_TIMER_PWM_OUT5_TCC == TCC2 || CONFIG_TIMER_PWM_OUT5_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT5_TCC == TCC2 || CONFIG_TIMER_PWM_OUT5_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT5_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT5_PIN, 5); @@ -229,7 +229,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT6 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT6_IS_TCC - if(CONFIG_TIMER_PWM_OUT6_TCC == TCC2 || CONFIG_TIMER_PWM_OUT6_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT6_TCC == TCC2 || CONFIG_TIMER_PWM_OUT6_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT6_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT6_PIN, 5); @@ -248,7 +248,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT7 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT7_IS_TCC - if(CONFIG_TIMER_PWM_OUT7_TCC == TCC2 || CONFIG_TIMER_PWM_OUT7_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT7_TCC == TCC2 || CONFIG_TIMER_PWM_OUT7_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT7_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT7_PIN, 5); @@ -267,7 +267,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT8 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT8_IS_TCC - if(CONFIG_TIMER_PWM_OUT8_TCC == TCC2 || CONFIG_TIMER_PWM_OUT8_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT8_TCC == TCC2 || CONFIG_TIMER_PWM_OUT8_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT8_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT8_PIN, 5); @@ -286,7 +286,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT9 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT9_IS_TCC - if(CONFIG_TIMER_PWM_OUT9_TCC == TCC2 || CONFIG_TIMER_PWM_OUT9_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT9_TCC == TCC2 || CONFIG_TIMER_PWM_OUT9_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT9_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT9_PIN, 5); @@ -305,7 +305,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT10 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT10_IS_TCC - if(CONFIG_TIMER_PWM_OUT10_TCC == TCC2 || CONFIG_TIMER_PWM_OUT10_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT10_TCC == TCC2 || CONFIG_TIMER_PWM_OUT10_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT10_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT10_PIN, 5); @@ -324,7 +324,7 @@ QState AOTimer::Stopped(AOTimer * const me, QEvt const * const e) { #if CONFIG_TIMER_PWM_OUT11 #ifdef USE_TCC_TIMERS #ifdef CONFIG_TIMER_PWM_OUT11_IS_TCC - if(CONFIG_TIMER_PWM_OUT11_TCC == TCC2 || CONFIG_TIMER_PWM_OUT11_FUNC == E)) + if(CONFIG_TIMER_PWM_OUT11_TCC == TCC2 || CONFIG_TIMER_PWM_OUT11_FUNC_E ) pinPeripheral(CONFIG_TIMER_PWM_OUT11_PIN, 4); else pinPeripheral(CONFIG_TIMER_PWM_OUT11_PIN, 5); From 4ff4ddf27c680922905c0ec34ae48f199d4499a4 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 03:30:51 +1000 Subject: [PATCH 7/8] fixed board_config.h ; --- boards/robohatmm1/board_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index ed78e757..4b1cb84d 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -136,7 +136,7 @@ #define CONFIG_TIMER_PWM_OUT6 1 #define CONFIG_TIMER_PWM_OUT6_IS_TCC #define CONFIG_TIMER_PWM_OUT6_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT6_FUNC E +#define CONFIG_TIMER_PWM_OUT6_FUNC_E 1 #define CONFIG_TIMER_PWM_OUT6_TCC TCC0 #define CONFIG_TIMER_PWM_OUT6_WO 1 #define CONFIG_TIMER_PWM_OUT6_PIN 9 //PA09 - SERVO_07 @@ -144,7 +144,7 @@ #define CONFIG_TIMER_PWM_OUT7 1 #define CONFIG_TIMER_PWM_OUT7_IS_TCC #define CONFIG_TIMER_PWM_OUT7_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT6_FUNC E +#define CONFIG_TIMER_PWM_OUT6_FUNC_E 1 #define CONFIG_TIMER_PWM_OUT7_TCC TCC0 #define CONFIG_TIMER_PWM_OUT7_WO 0 #define CONFIG_TIMER_PWM_OUT7_PIN 8 //PA08 - SERVO_08 From cc9e1037182a34b1aa30e757555e560ba3eb7959 Mon Sep 17 00:00:00 2001 From: wallarug Date: Thu, 2 May 2019 04:30:08 +1000 Subject: [PATCH 8/8] final board file for robohat mm1 working 2/05/2019 --- boards/robohatmm1/board_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/robohatmm1/board_config.h b/boards/robohatmm1/board_config.h index 4b1cb84d..4b9d7965 100644 --- a/boards/robohatmm1/board_config.h +++ b/boards/robohatmm1/board_config.h @@ -144,7 +144,7 @@ #define CONFIG_TIMER_PWM_OUT7 1 #define CONFIG_TIMER_PWM_OUT7_IS_TCC #define CONFIG_TIMER_PWM_OUT7_TC NOT_ON_TC -#define CONFIG_TIMER_PWM_OUT6_FUNC_E 1 +#define CONFIG_TIMER_PWM_OUT7_FUNC_E 1 #define CONFIG_TIMER_PWM_OUT7_TCC TCC0 #define CONFIG_TIMER_PWM_OUT7_WO 0 #define CONFIG_TIMER_PWM_OUT7_PIN 8 //PA08 - SERVO_08