aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F3xx
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-07-08 16:15:01 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-07-08 16:15:01 +0000
commit0c8fc98a9d6608eda478b3e5db3e48ce921e4375 (patch)
treea48627975e3b6f7e2d5e79ef526e749c9c555d8d /testhal/STM32/STM32F3xx
parent72bb557dfbf584ffd0bfd5051055bc2e88cc2293 (diff)
downloadChibiOS-0c8fc98a9d6608eda478b3e5db3e48ce921e4375.tar.gz
ChibiOS-0c8fc98a9d6608eda478b3e5db3e48ce921e4375.tar.bz2
ChibiOS-0c8fc98a9d6608eda478b3e5db3e48ce921e4375.zip
Removed unused functions in L3GD20 driver,
Indent fixes in L3GD20 related demos. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9695 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F3xx')
-rw-r--r--testhal/STM32/STM32F3xx/SPI-L3GD20/main.c50
1 files changed, 20 insertions, 30 deletions
diff --git a/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c b/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c
index beb2b6927..2f2199fc6 100644
--- a/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c
+++ b/testhal/STM32/STM32F3xx/SPI-L3GD20/main.c
@@ -28,7 +28,7 @@
/* L3GD20 related. */
/*===========================================================================*/
-/* L3GD20 Driver: This object represent an L3GD20 instance */
+/* L3GD20 Driver: This object represent an L3GD20 instance.*/
static L3GD20Driver L3GD20D1;
static int32_t rawdata[L3GD20_NUMBER_OF_AXES];
@@ -40,20 +40,20 @@ static uint32_t i;
static const SPIConfig spicfg = {
NULL,
- GPIOE, /* port of L3GD20 CS */
- GPIOE_L3GD20_CS, /* pin of L3GD20 CS */
- SPI_CR1_BR | SPI_CR1_CPOL | SPI_CR1_CPHA, /* CR1 register */
- 0 /* CR2 register */
+ GPIOE, /* port of L3GD20 CS.*/
+ GPIOE_L3GD20_CS, /* pin of L3GD20 CS.*/
+ SPI_CR1_BR | SPI_CR1_CPOL | SPI_CR1_CPHA, /* CR1 register.*/
+ 0 /* CR2 register.*/
};
static L3GD20Config l3gd20cfg = {
- &SPID1, /* Pointer to SPI Driver */
- &spicfg, /* Pointer to SPI Configuration */
- {0, 0, 0}, /* Use default sensitivity */
- {0, 0, 0}, /* Use default bias */
- L3GD20_UNIT_DPS, /* Measurement unit DPS */
- L3GD20_FS_250DPS, /* Full scale value */
- L3GD20_ODR_760HZ, /* Output data rate */
+ &SPID1, /* Pointer to SPI Driver.*/
+ &spicfg, /* Pointer to SPI Configuration.*/
+ {0, 0, 0}, /* Use default sensitivity.*/
+ {0, 0, 0}, /* Use default bias.*/
+ L3GD20_UNIT_DPS, /* Measurement unit DPS.*/
+ L3GD20_FS_250DPS, /* Full scale value.*/
+ L3GD20_ODR_760HZ, /* Output data rate.*/
#if L3GD20_USE_ADVANCED || defined(__DOXYGEN__)
L3GD20_BDU_CONTINUOUS,
L3GD20_END_LITTLE,
@@ -75,9 +75,9 @@ static L3GD20Config l3gd20cfg = {
#define usb_lld_connect_bus(usbp)
#define usb_lld_disconnect_bus(usbp)
-/* Enable use of special ANSI escape sequences */
-#define CHPRINTF_USE_ANSI_CODE TRUE
-#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
+/* Enable use of special ANSI escape sequences.*/
+#define CHPRINTF_USE_ANSI_CODE TRUE
+#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
static void cmd_get(BaseSequentialStream *chp, int argc, char *argv[]) {
(void)argv;
@@ -259,9 +259,7 @@ int main(void) {
halInit();
chSysInit();
- /*
- * Initializes a serial-over-USB CDC driver.
- */
+ /* Initializes a serial-over-USB CDC driver.*/
sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg);
@@ -275,24 +273,16 @@ int main(void) {
usbStart(serusbcfg.usbp, &usbcfg);
usbConnectBus(serusbcfg.usbp);
- /*
- * Creates the blinker thread.
- */
+ /* Creates the blinker thread.*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
- /*
- * L3GD20 Object Initialization
- */
+ /* L3GD20 Object Initialization.*/
l3gd20ObjectInit(&L3GD20D1);
- /*
- * Activates the L3GD20 driver.
- */
+ /* Activates the L3GD20 driver.*/
l3gd20Start(&L3GD20D1, &l3gd20cfg);
- /*
- * Shell manager initialization.
- */
+ /* Shell manager initialization.*/
shellInit();
while(TRUE) {