From 514354a2ed20dd60241ec5c356998b4c43fe1237 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 7 Aug 2012 10:42:01 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4539 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM4-STM32F407-DISCOVERY/main.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'demos/ARMCM4-STM32F407-DISCOVERY/main.c') diff --git a/demos/ARMCM4-STM32F407-DISCOVERY/main.c b/demos/ARMCM4-STM32F407-DISCOVERY/main.c index 7dc61425a..5984538a2 100644 --- a/demos/ARMCM4-STM32F407-DISCOVERY/main.c +++ b/demos/ARMCM4-STM32F407-DISCOVERY/main.c @@ -21,8 +21,6 @@ #include "ch.h" #include "hal.h" #include "test.h" -#include "lis302dl.h" -#include "chprintf.h" static void pwmpcb(PWMDriver *pwmp); static void adccb(ADCDriver *adcp, adcsample_t *buffer, size_t n); @@ -249,16 +247,6 @@ int main(void) { */ chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); - /* - * Initializes the SPI driver 1 in order to access the MEMS. The signals - * are initialized in the board file. - * Several LIS302DL registers are then initialized. - */ - spiStart(&SPID1, &spi1cfg); - lis302dlWriteRegister(&SPID1, LIS302DL_CTRL_REG1, 0x43); - lis302dlWriteRegister(&SPID1, LIS302DL_CTRL_REG2, 0x00); - lis302dlWriteRegister(&SPID1, LIS302DL_CTRL_REG3, 0x00); - /* * Normal main() thread activity, in this demo it does nothing except * sleeping in a loop and check the button state, when the button is @@ -266,15 +254,8 @@ int main(void) { * driver 2. */ while (TRUE) { - int8_t x, y, z; - if (palReadPad(GPIOA, GPIOA_BUTTON)) TestThread(&SD2); - - x = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTX); - y = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTY); - z = (int8_t)lis302dlReadRegister(&SPID1, LIS302DL_OUTZ); - chprintf((BaseSequentialStream *)&SD2, "%d, %d, %d\r\n", x, y, z); chThdSleepMilliseconds(500); } } -- cgit v1.2.3