aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2017-09-17 21:00:56 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2017-09-17 21:00:56 +0000
commit908373b487072d551d98059af63ce362dcc652fa (patch)
treeb37d5e6d5ee09d692c5c17419b40d589ef7b80ff /demos
parent0d45b1da6ee631dfe581304ba8abd3994c4896a8 (diff)
downloadChibiOS-908373b487072d551d98059af63ce362dcc652fa.tar.gz
ChibiOS-908373b487072d551d98059af63ce362dcc652fa.tar.bz2
ChibiOS-908373b487072d551d98059af63ce362dcc652fa.zip
Added PAL driver
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10630 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/halconf.h22
-rwxr-xr-xdemos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/main.c4
2 files changed, 22 insertions, 4 deletions
diff --git a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/halconf.h b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/halconf.h
index d1d69ab8f..800077363 100644
--- a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/halconf.h
+++ b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/halconf.h
@@ -34,7 +34,7 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL FALSE
+#define HAL_USE_PAL TRUE
#endif
/**
@@ -178,6 +178,26 @@
#endif
/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
+#endif
+
+/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
diff --git a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/main.c b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/main.c
index c0fa19e5f..e06c3471d 100755
--- a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/main.c
+++ b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/main.c
@@ -27,9 +27,7 @@ static THD_FUNCTION(Thread1, arg) {
chRegSetThreadName("blinker");
while (true) {
- PIOA->PIO_PIO_[1].S_PIO_CODR = S_PIO_CODR_P5;
- chThdSleepMilliseconds(500);
- PIOA->PIO_PIO_[1].S_PIO_SODR = S_PIO_SODR_P5;
+ palToggleLine(LINE_LED_BLUE);
chThdSleepMilliseconds(500);
}
}