aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
Diffstat (limited to 'testhal')
-rw-r--r--testhal/SPC563Mxx/ICU-PWM/halconf.h2
-rw-r--r--testhal/SPC563Mxx/ICU-PWM/main.c53
-rw-r--r--testhal/SPC564Axx/ICU-PWM/Makefile (renamed from testhal/SPC564Axx/ICU_PWM/Makefile)0
-rw-r--r--testhal/SPC564Axx/ICU-PWM/chconf.h (renamed from testhal/SPC564Axx/ICU_PWM/chconf.h)0
-rw-r--r--testhal/SPC564Axx/ICU-PWM/halconf.h (renamed from testhal/SPC564Axx/ICU_PWM/halconf.h)0
-rw-r--r--testhal/SPC564Axx/ICU-PWM/main.c (renamed from testhal/SPC564Axx/ICU_PWM/main.c)54
-rw-r--r--testhal/SPC564Axx/ICU-PWM/mcuconf.h (renamed from testhal/SPC564Axx/ICU_PWM/mcuconf.h)0
-rw-r--r--testhal/SPC564Axx/ICU-PWM/readme.txt (renamed from testhal/SPC564Axx/ICU_PWM/readme.txt)0
8 files changed, 50 insertions, 59 deletions
diff --git a/testhal/SPC563Mxx/ICU-PWM/halconf.h b/testhal/SPC563Mxx/ICU-PWM/halconf.h
index 24462dafd..3a6d72910 100644
--- a/testhal/SPC563Mxx/ICU-PWM/halconf.h
+++ b/testhal/SPC563Mxx/ICU-PWM/halconf.h
@@ -128,7 +128,7 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL TRUE
+#define HAL_USE_SERIAL FALSE
#endif
/**
diff --git a/testhal/SPC563Mxx/ICU-PWM/main.c b/testhal/SPC563Mxx/ICU-PWM/main.c
index 60c451373..48e02d3f6 100644
--- a/testhal/SPC563Mxx/ICU-PWM/main.c
+++ b/testhal/SPC563Mxx/ICU-PWM/main.c
@@ -1,21 +1,21 @@
/*
- ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-
- 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.
-*/
+ * 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.
+ */
-#include "ch.h"
-#include "hal.h"
+/* 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"
static void pwmpcb(PWMDriver *pwmp) {
@@ -30,8 +30,8 @@ static void pwmc1cb(PWMDriver *pwmp) {
}
static PWMConfig pwmcfg = {
- 80000, /* 80kHz PWM clock frequency.*/
- 20000, /* Initial PWM period 0.25s.*/
+ 100000, /* 100kHz PWM clock frequency.*/
+ 20000, /* Initial PWM period 0.2s.*/
pwmpcb,
{
{PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb}
@@ -40,7 +40,6 @@ static PWMConfig pwmcfg = {
};
icucnt_t last_width, last_period;
-icucnt_t last_width2, last_period2;
static void icuwidthcb(ICUDriver *icup) {
@@ -56,7 +55,7 @@ static void icuperiodcb(ICUDriver *icup) {
static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
- 80000, /* 80kHz ICU clock frequency.*/
+ 100000, /* 100kHz ICU clock frequency.*/
icuwidthcb,
icuperiodcb,
NULL
@@ -67,15 +66,11 @@ static ICUConfig icucfg = {
*/
int main(void) {
- /*
- * System initializations.
- * - HAL initialization, this also initializes the configured device drivers
- * and performs the board-specific initializations.
- * - Kernel initialization, the main() function becomes a thread and the
- * RTOS is active.
- */
- halInit();
- chSysInit();
+ /* Initialization of all the imported components in the order specified in
+ the application wizard. The function is generated automatically.*/
+ componentsInit();
+
+ palClearPad(PORT11, P11_LED4);
/*
* Initializes the PWM driver 8 and ICU driver 1.
diff --git a/testhal/SPC564Axx/ICU_PWM/Makefile b/testhal/SPC564Axx/ICU-PWM/Makefile
index bdd72d6ac..bdd72d6ac 100644
--- a/testhal/SPC564Axx/ICU_PWM/Makefile
+++ b/testhal/SPC564Axx/ICU-PWM/Makefile
diff --git a/testhal/SPC564Axx/ICU_PWM/chconf.h b/testhal/SPC564Axx/ICU-PWM/chconf.h
index b4c46c7f6..b4c46c7f6 100644
--- a/testhal/SPC564Axx/ICU_PWM/chconf.h
+++ b/testhal/SPC564Axx/ICU-PWM/chconf.h
diff --git a/testhal/SPC564Axx/ICU_PWM/halconf.h b/testhal/SPC564Axx/ICU-PWM/halconf.h
index 24462dafd..24462dafd 100644
--- a/testhal/SPC564Axx/ICU_PWM/halconf.h
+++ b/testhal/SPC564Axx/ICU-PWM/halconf.h
diff --git a/testhal/SPC564Axx/ICU_PWM/main.c b/testhal/SPC564Axx/ICU-PWM/main.c
index e571bbeed..fbaf98376 100644
--- a/testhal/SPC564Axx/ICU_PWM/main.c
+++ b/testhal/SPC564Axx/ICU-PWM/main.c
@@ -1,21 +1,21 @@
/*
- ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
-
- 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.
-*/
+ * 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.
+ */
-#include "ch.h"
-#include "hal.h"
+/* 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"
static void pwmpcb(PWMDriver *pwmp) {
@@ -30,8 +30,8 @@ static void pwmc1cb(PWMDriver *pwmp) {
}
static PWMConfig pwmcfg = {
- 80000, /* 80kHz PWM clock frequency.*/
- 20000, /* Initial PWM period 0.25s.*/
+ 187500, /* 187500Hz PWM clock frequency.*/
+ 19500, /* Initial PWM period 0.1040s.*/
pwmpcb,
{
{PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb}
@@ -40,7 +40,6 @@ static PWMConfig pwmcfg = {
};
icucnt_t last_width, last_period;
-icucnt_t last_width2, last_period2;
static void icuwidthcb(ICUDriver *icup) {
@@ -56,7 +55,7 @@ static void icuperiodcb(ICUDriver *icup) {
static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
- 80000, /* 80kHz ICU clock frequency.*/
+ 187500, /* 187500Hz ICU clock frequency.*/
icuwidthcb,
icuperiodcb,
NULL
@@ -66,15 +65,12 @@ static ICUConfig icucfg = {
* Application entry point.
*/
int main(void) {
- /*
- * System initializations.
- * - HAL initialization, this also initializes the configured device drivers
- * and performs the board-specific initializations.
- * - Kernel initialization, the main() function becomes a thread and the
- * RTOS is active.
- */
- halInit();
- chSysInit();
+
+ /* Initialization of all the imported components in the order specified in
+ the application wizard. The function is generated automatically.*/
+ componentsInit();
+
+ palClearPad(PORT11, P11_LED4);
/*
* Initializes the PWM driver 6 and ICU driver 3.
diff --git a/testhal/SPC564Axx/ICU_PWM/mcuconf.h b/testhal/SPC564Axx/ICU-PWM/mcuconf.h
index a2e46cd16..a2e46cd16 100644
--- a/testhal/SPC564Axx/ICU_PWM/mcuconf.h
+++ b/testhal/SPC564Axx/ICU-PWM/mcuconf.h
diff --git a/testhal/SPC564Axx/ICU_PWM/readme.txt b/testhal/SPC564Axx/ICU-PWM/readme.txt
index f6018c4f3..f6018c4f3 100644
--- a/testhal/SPC564Axx/ICU_PWM/readme.txt
+++ b/testhal/SPC564Axx/ICU-PWM/readme.txt