Cosmetic changes to LSM303DLHC demos

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11656 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
Rocco Marco Guglielmi 2018-03-09 08:06:25 +00:00
parent c72c670130
commit ccdc24bfd1
2 changed files with 11 additions and 30 deletions

View File

@ -102,29 +102,20 @@ int main(void) {
halInit(); halInit();
chSysInit(); chSysInit();
/* /* Activates the serial driver 1 using the driver default configuration. */
* Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD1, NULL); sdStart(&SD1, NULL);
/* /* Creates the blinker thread.*/
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
/*
* LSM303DLHC Object Initialization /* LSM303DLHC Object Initialization.*/
*/
lsm303dlhcObjectInit(&LSM303DLHCD1); lsm303dlhcObjectInit(&LSM303DLHCD1);
/* /* Activates the LSM303DLHC driver.*/
* Activates the LSM303DLHC driver.
*/
lsm303dlhcStart(&LSM303DLHCD1, &lsm303dlhccfg); lsm303dlhcStart(&LSM303DLHCD1, &lsm303dlhccfg);
/* /* Normal main() thread activity, printing MEMS data on the SD1. */
* Normal main() thread activity, printing MEMS data on the serial driver 1.
*/
while (true) { while (true) {
lsm303dlhcAccelerometerReadRaw(&LSM303DLHCD1, accraw); lsm303dlhcAccelerometerReadRaw(&LSM303DLHCD1, accraw);
chprintf(chp, "LSM303DLHC Accelerometer raw data...\r\n"); chprintf(chp, "LSM303DLHC Accelerometer raw data...\r\n");

View File

@ -104,9 +104,7 @@ int main(void) {
halInit(); halInit();
chSysInit(); chSysInit();
/* /* Initializes a serial-over-USB CDC driver.*/
* Initializes a serial-over-USB CDC driver.
*/
sduObjectInit(&SDU1); sduObjectInit(&SDU1);
sduStart(&SDU1, &serusbcfg); sduStart(&SDU1, &serusbcfg);
@ -120,24 +118,16 @@ int main(void) {
usbStart(serusbcfg.usbp, &usbcfg); usbStart(serusbcfg.usbp, &usbcfg);
usbConnectBus(serusbcfg.usbp); usbConnectBus(serusbcfg.usbp);
/* /* Creates the blinker thread.*/
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 1, Thread1, NULL);
/* /* LSM303DLHC Object Initialization.*/
* LSM303DLHC Object Initialization
*/
lsm303dlhcObjectInit(&LSM303DLHCD1); lsm303dlhcObjectInit(&LSM303DLHCD1);
/* /* Activates the LSM303DLHC driver.*/
* Activates the LSM303DLHC driver.
*/
lsm303dlhcStart(&LSM303DLHCD1, &lsm303dlhccfg); lsm303dlhcStart(&LSM303DLHCD1, &lsm303dlhccfg);
/* /* Normal main() thread activity, printing MEMS data on the SDU1. */
* Normal main() thread activity, printing MEMS data on the serial driver 1.
*/
while (true) { while (true) {
lsm303dlhcAccelerometerReadRaw(&LSM303DLHCD1, accraw); lsm303dlhcAccelerometerReadRaw(&LSM303DLHCD1, accraw);
chprintf(chp, "LSM303DLHC Accelerometer raw data...\r\n"); chprintf(chp, "LSM303DLHC Accelerometer raw data...\r\n");