aboutsummaryrefslogtreecommitdiffstats
path: root/testex/STM32/STM32F4xx
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-03-09 08:02:15 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2018-03-09 08:02:15 +0000
commitc72c6701301602911cc6aca301faeaa4abf5cb1e (patch)
treed59624027b80772a7ff56c69455976a26b7878c1 /testex/STM32/STM32F4xx
parentafefa3bffd0b6aabf0078f55c496a4874d5a8d42 (diff)
downloadChibiOS-c72c6701301602911cc6aca301faeaa4abf5cb1e.tar.gz
ChibiOS-c72c6701301602911cc6aca301faeaa4abf5cb1e.tar.bz2
ChibiOS-c72c6701301602911cc6aca301faeaa4abf5cb1e.zip
Updated STM32L4xx/SPI-L3GD20 demo. Cosmetic changes to L3GD20 demos
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11655 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testex/STM32/STM32F4xx')
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/main.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/main.c b/testex/STM32/STM32F4xx/SPI-L3GD20/main.c
index b95b356dc..08e0dadbb 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/main.c
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/main.c
@@ -63,7 +63,7 @@ static L3GD20Config l3gd20cfg = {
};
/*===========================================================================*/
-/* Main code. */
+/* Generic code. */
/*===========================================================================*/
static BaseSequentialStream* chp = (BaseSequentialStream*)&SDU1;
@@ -116,22 +116,15 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);
/* Creates the blinker thread.*/
- chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
+ chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- /*
- * L3GD20 Object Initialization
- */
+ /* L3GD20 Object Initialization.*/
l3gd20ObjectInit(&L3GD20D1);
- /*
- * Activates the L3GD20 driver.
- */
+ /* Activates the L3GD20 driver.*/
l3gd20Start(&L3GD20D1, &l3gd20cfg);
- /*
- * Normal main() thread activity, printing MEMS data on the serial over usb
- * driver 1.
- */
+ /* Normal main() thread activity, printing MEMS data on the SDU1.*/
while (true) {
l3gd20GyroscopeReadRaw(&L3GD20D1, gyroraw);
chprintf(chp, "L3GD20 Gyroscope raw data...\r\n");