From ee1eb360863b0dc94fc4a19587d001747c5fb8d5 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 27 Mar 2013 14:33:06 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5509 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/SPC560Pxx/platform.mk | 4 +++ os/hal/platforms/SPC56ELxx/platform.mk | 4 +++ os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.h | 8 ++--- os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.h | 8 ++--- testhal/SPC560Pxx/PWM-ICU/main.c | 36 +++++++++++--------- testhal/SPC56ELxx/PWM-ICU/main.c | 36 +++++++++++--------- 6 files changed, 54 insertions(+), 42 deletions(-) diff --git a/os/hal/platforms/SPC560Pxx/platform.mk b/os/hal/platforms/SPC560Pxx/platform.mk index 53b94c39d..864eaae15 100644 --- a/os/hal/platforms/SPC560Pxx/platform.mk +++ b/os/hal/platforms/SPC560Pxx/platform.mk @@ -1,9 +1,13 @@ # List of all the SPC560Pxx platform files. PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/SPC560Pxx/hal_lld.c \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/eTimer_v1/icu_lld.c \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.c \ ${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1/pal_lld.c \ ${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c # Required include directories PLATFORMINC = ${CHIBIOS}/os/hal/platforms/SPC560Pxx \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/eTimer_v1 \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/FlexPWM_v1 \ ${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1 \ ${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1 diff --git a/os/hal/platforms/SPC56ELxx/platform.mk b/os/hal/platforms/SPC56ELxx/platform.mk index 61f1cf3de..b907987d6 100644 --- a/os/hal/platforms/SPC56ELxx/platform.mk +++ b/os/hal/platforms/SPC56ELxx/platform.mk @@ -1,9 +1,13 @@ # List of all the SPC56ELxx platform files. PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/SPC56ELxx/hal_lld.c \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/eTimer_v1/icu_lld.c \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.c \ ${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1/pal_lld.c \ ${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c # Required include directories PLATFORMINC = ${CHIBIOS}/os/hal/platforms/SPC56ELxx \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/eTimer_v1 \ + ${CHIBIOS}/os/hal/platforms/SPC5xx/FlexPWM_v1 \ ${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1 \ ${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1 diff --git a/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.h b/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.h index 9ad820ee4..faffc6394 100644 --- a/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.h +++ b/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.h @@ -458,11 +458,11 @@ #error "EQADC not present in the selected device" #endif -#define SPC5_ADC_USE_ADC0 (SPC5_ADC_USE_ADC0_Q0 | \ - SPC5_ADC_USE_ADC0_Q1 | \ +#define SPC5_ADC_USE_ADC0 (SPC5_ADC_USE_ADC0_Q0 || \ + SPC5_ADC_USE_ADC0_Q1 || \ SPC5_ADC_USE_ADC0_Q2) -#define SPC5_ADC_USE_ADC1 (SPC5_ADC_USE_ADC1_Q3 | \ - SPC5_ADC_USE_ADC1_Q4 | \ +#define SPC5_ADC_USE_ADC1 (SPC5_ADC_USE_ADC1_Q3 || \ + SPC5_ADC_USE_ADC1_Q4 || \ SPC5_ADC_USE_ADC1_Q5) #if !SPC5_ADC_USE_ADC0 && !SPC5_ADC_USE_ADC1 diff --git a/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.h b/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.h index 042102977..207f314d3 100644 --- a/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.h +++ b/os/hal/platforms/SPC5xx/FlexPWM_v1/pwm_lld.h @@ -240,28 +240,28 @@ * @brief PWMD5 interrupt priority level setting. */ #if !defined(SPC5_PWM_SMOD4_PRIORITY) || defined(__DOXYGEN__) -#define SPC5_PWM_SMOD4_PRIORITY 7 +#define SPC5_PWM_SMOD4_PRIORITY 7 #endif /** * @brief PWMD6 interrupt priority level setting. */ #if !defined(SPC5_PWM_SMOD5_PRIORITY) || defined(__DOXYGEN__) -#define SPC5_PWM_SMOD5_PRIORITY 7 +#define SPC5_PWM_SMOD5_PRIORITY 7 #endif /** * @brief PWMD7 interrupt priority level setting. */ #if !defined(SPC5_PWM_SMOD6_PRIORITY) || defined(__DOXYGEN__) -#define SPC5_PWM_SMOD6_PRIORITY 7 +#define SPC5_PWM_SMOD6_PRIORITY 7 #endif /** * @brief PWMD8 interrupt priority level setting. */ #if !defined(SPC5_PWM_SMOD7_PRIORITY) || defined(__DOXYGEN__) -#define SPC5_PWM_SMOD7_PRIORITY 7 +#define SPC5_PWM_SMOD7_PRIORITY 7 #endif /** diff --git a/testhal/SPC560Pxx/PWM-ICU/main.c b/testhal/SPC560Pxx/PWM-ICU/main.c index d922b959f..32c4a9c91 100644 --- a/testhal/SPC560Pxx/PWM-ICU/main.c +++ b/testhal/SPC560Pxx/PWM-ICU/main.c @@ -1,23 +1,25 @@ /* - * Licensed under ST Liberty SW License Agreement V2, (the "License"); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.st.com/software_license_agreement_liberty_v2 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011,2012,2013 Giovanni Di Sirio. -/* Inclusion of the main header files of all the imported components in the - order specified in the application wizard. The file is generated - automatically.*/ -#include "components.h" + This file is part of ChibiOS/RT. -#include "shellcmd.h" + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "ch.h" +#include "hal.h" static void pwmpcb(PWMDriver *pwmp) { diff --git a/testhal/SPC56ELxx/PWM-ICU/main.c b/testhal/SPC56ELxx/PWM-ICU/main.c index ba6b1ad7f..36e6c1176 100644 --- a/testhal/SPC56ELxx/PWM-ICU/main.c +++ b/testhal/SPC56ELxx/PWM-ICU/main.c @@ -1,23 +1,25 @@ /* - * Licensed under ST Liberty SW License Agreement V2, (the "License"); - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.st.com/software_license_agreement_liberty_v2 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011,2012,2013 Giovanni Di Sirio. -/* Inclusion of the main header files of all the imported components in the - order specified in the application wizard. The file is generated - automatically.*/ -#include "components.h" + This file is part of ChibiOS/RT. -#include "shellcmd.h" + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "ch.h" +#include "hal.h" static void pwmpcb(PWMDriver *pwmp) {